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 = {
|
let output_filename = {
|
||||||
match &manifest.package.as_ref().unwrap().default_run {
|
match &manifest.package.as_ref().unwrap().default_run {
|
||||||
Some(default_run_target) => {
|
Some(default_run_target) => default_run_target.to_owned(),
|
||||||
default_run_target.to_owned()
|
None => manifest
|
||||||
},
|
.bin
|
||||||
None => {
|
.iter()
|
||||||
manifest.bin.iter().find(|b| b.name == manifest.package.as_ref().map(|pkg| pkg.name.clone()))
|
.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
|
||||||
.or(manifest.bin.first())
|
.bin
|
||||||
.or(manifest.lib.as_ref())
|
.iter()
|
||||||
.and_then(|prod| prod.name.clone())
|
.find(|b| b.path == Some("src/main.rs".to_owned())))
|
||||||
.expect("No executable or library found from cargo metadata.")
|
.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);
|
let executable = ExecutableType::Binary(output_filename);
|
||||||
|
|||||||
Reference in new issue
Block a user