We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
check_for_file_and_add
1 parent f7d0c8b commit 1dde1e1Copy full SHA for 1dde1e1
src/cargo/ops/cargo_package.rs
@@ -332,10 +332,7 @@ fn check_for_file_and_add(
332
Err(_) => {
333
// The file exists somewhere outside of the package.
334
let file_name = file_path.file_name().unwrap();
335
- if result
336
- .iter()
337
- .any(|ar| ar.rel_path.file_name().unwrap() == file_name)
338
- {
+ if result.iter().any(|ar| ar.rel_path == file_name) {
339
ws.config().shell().warn(&format!(
340
"{} `{}` appears to be a path outside of the package, \
341
but there is already a file named `{}` in the root of the package. \
0 commit comments