fix: Remove conflicting rustfmt config for cli (#1135)
This commit is contained in:
1 parent
ec0fce3aef
commit
20c088b990
2 files changed
+13
-19
No files matched your search
@@ -1,8 +0,0 @@
|
||||
version = "Two"
|
||||
edition = "2021"
|
||||
|
||||
imports_granularity = "Crate"
|
||||
#use_small_heuristics = "Max"
|
||||
#control_brace_style = "ClosingNextLine"
|
||||
normalize_comments = true
|
||||
format_code_in_doc_comments = true
|
||||
+13
-11
@@ -188,17 +188,19 @@ impl CrateConfig {
|
||||
|
||||
let output_filename = {
|
||||
match &manifest.package.as_ref().unwrap().default_run {
|
||||
Some(default_run_target) => {
|
||||
default_run_target.to_owned()
|
||||
},
|
||||
None => {
|
||||
manifest.bin.iter().find(|b| b.name == manifest.package.as_ref().map(|pkg| pkg.name.clone()))
|
||||
.or(manifest.bin.iter().find(|b| b.path == Some("src/main.rs".to_owned())))
|
||||
.or(manifest.bin.first())
|
||||
.or(manifest.lib.as_ref())
|
||||
.and_then(|prod| prod.name.clone())
|
||||
.expect("No executable or library found from cargo metadata.")
|
||||
}
|
||||
Some(default_run_target) => default_run_target.to_owned(),
|
||||
None => manifest
|
||||
.bin
|
||||
.iter()
|
||||
.find(|b| b.name == manifest.package.as_ref().map(|pkg| pkg.name.clone()))
|
||||
.or(manifest
|
||||
.bin
|
||||
.iter()
|
||||
.find(|b| b.path == Some("src/main.rs".to_owned())))
|
||||
.or(manifest.bin.first())
|
||||
.or(manifest.lib.as_ref())
|
||||
.and_then(|prod| prod.name.clone())
|
||||
.expect("No executable or library found from cargo metadata."),
|
||||
}
|
||||
};
|
||||
let executable = ExecutableType::Binary(output_filename);
|
||||
|
||||
Reference in new issue
Block a user