1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 05:27:45 +00:00

mv: remove unnecessary OR in condition

This commit is contained in:
Daniel Hofstetter 2023-08-09 16:15:30 +02:00
parent 0c6b1893a4
commit 09360e6796

View file

@ -433,9 +433,7 @@ fn rename(
let mut backup_path = None;
if to.exists() {
if (b.update == UpdateMode::ReplaceIfOlder || b.update == UpdateMode::ReplaceNone)
&& b.overwrite == OverwriteMode::Interactive
{
if b.update == UpdateMode::ReplaceIfOlder && b.overwrite == OverwriteMode::Interactive {
// `mv -i --update old new` when `new` exists doesn't move anything
// and exit with 0
return Ok(());