Skip to content

Commit

Permalink
Update src/cargo/ops/cargo_new.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
  • Loading branch information
Aelnor and weihanglo committed Jun 1, 2021
1 parent 3bc2341 commit 4ec3bc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ pub fn init(opts: &NewOptions, config: &Config) -> CargoResult<NewProjectKind> {
} else if src_paths_types.len() == 1 && !src_paths_types.iter().any(|x| x.bin == has_bin) {
// we've found the only file and it's not the type user wants. Change the type and warn
let file_type = if src_paths_types[0].bin {
NewProjectKind::Bin.to_string()
NewProjectKind::Bin
} else {
NewProjectKind::Lib.to_string()
NewProjectKind::Lib
};
config.shell().warn(format!(
"file `{}` seems to be a {} file",
Expand Down

0 comments on commit 4ec3bc0

Please sign in to comment.