Take executable from configured bin
This commit is contained in:
1 parent
962ab2726a
commit
3f197507ba
1 file changed
+3
-2
+3
-2
@@ -141,8 +141,9 @@ impl CrateConfig {
|
|||||||
// We just assume they're using a 'main.rs'
|
// We just assume they're using a 'main.rs'
|
||||||
// Anyway, we've already parsed the manifest, so it should be easy to change the type
|
// Anyway, we've already parsed the manifest, so it should be easy to change the type
|
||||||
let output_filename = manifest
|
let output_filename = manifest
|
||||||
.lib
|
.bin
|
||||||
.as_ref()
|
.first()
|
||||||
|
.or(manifest.lib.as_ref())
|
||||||
.and_then(|lib| lib.name.clone())
|
.and_then(|lib| lib.name.clone())
|
||||||
.or_else(|| manifest.package.as_ref().map(|pkg| pkg.name.clone()))
|
.or_else(|| manifest.package.as_ref().map(|pkg| pkg.name.clone()))
|
||||||
.expect("No lib found from cargo metadata");
|
.expect("No lib found from cargo metadata");
|
||||||
|
|||||||
Reference in new issue
Block a user