Skip to content

Commit 1dde1e1

Browse files
committed
Fix check_for_file_and_add's check for conflict file
Signed-off-by: Eval EXEC <[email protected]>
1 parent f7d0c8b commit 1dde1e1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/cargo/ops/cargo_package.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,7 @@ fn check_for_file_and_add(
332332
Err(_) => {
333333
// The file exists somewhere outside of the package.
334334
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-
{
335+
if result.iter().any(|ar| ar.rel_path == file_name) {
339336
ws.config().shell().warn(&format!(
340337
"{} `{}` appears to be a path outside of the package, \
341338
but there is already a file named `{}` in the root of the package. \

0 commit comments

Comments
 (0)