Skip to content

Commit 6cd1bb5

Browse files
committed
ln: use let _ = instead of empty if block for ignored results
1 parent 74f9c11 commit 6cd1bb5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/uu/ln/src/ln.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ fn link(src: &Path, dst: &Path, settings: &Settings) -> UResult<()> {
415415
return Err(LnError::SomeLinksFailed.into());
416416
}
417417

418-
if fs::remove_file(dst).is_ok() {}
418+
let _ = fs::remove_file(dst);
419419
// In case of error, don't do anything
420420
}
421421
OverwriteMode::Force => {
@@ -432,7 +432,7 @@ fn link(src: &Path, dst: &Path, settings: &Settings) -> UResult<()> {
432432
return Err(LnError::SameFile(src.to_owned(), dst.to_owned()).into());
433433
}
434434
}
435-
if fs::remove_file(dst).is_ok() {}
435+
let _ = fs::remove_file(dst);
436436
// In case of error, don't do anything
437437
}
438438
}

0 commit comments

Comments
 (0)