Skip to content

Commit 4ec3bc0

Browse files
Aelnorweihanglo
andauthored
Update src/cargo/ops/cargo_new.rs
Co-authored-by: Weihang Lo <[email protected]>
1 parent 3bc2341 commit 4ec3bc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/ops/cargo_new.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,9 +473,9 @@ pub fn init(opts: &NewOptions, config: &Config) -> CargoResult<NewProjectKind> {
473473
} else if src_paths_types.len() == 1 && !src_paths_types.iter().any(|x| x.bin == has_bin) {
474474
// we've found the only file and it's not the type user wants. Change the type and warn
475475
let file_type = if src_paths_types[0].bin {
476-
NewProjectKind::Bin.to_string()
476+
NewProjectKind::Bin
477477
} else {
478-
NewProjectKind::Lib.to_string()
478+
NewProjectKind::Lib
479479
};
480480
config.shell().warn(format!(
481481
"file `{}` seems to be a {} file",

0 commit comments

Comments
 (0)