mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-17 12:16:17 +00:00
refactor/install ~ fix cargo clippy
complaint (clippy::needless_borrow)
This commit is contained in:
parent
9f2cb2e5e9
commit
c66d67a0b9
1 changed files with 4 additions and 4 deletions
|
@ -379,7 +379,7 @@ fn directory(paths: Vec<String>, b: Behavior) -> i32 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if mode::chmod(&path, b.mode()).is_err() {
|
if mode::chmod(path, b.mode()).is_err() {
|
||||||
all_successful = false;
|
all_successful = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -422,7 +422,7 @@ fn standard(paths: Vec<String>, b: Behavior) -> i32 {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if mode::chmod(&parent, b.mode()).is_err() {
|
if mode::chmod(parent, b.mode()).is_err() {
|
||||||
show_error!("failed to chmod {}", parent.display());
|
show_error!("failed to chmod {}", parent.display());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ fn copy_files_into_dir(files: &[PathBuf], target_dir: &Path, b: &Behavior) -> i3
|
||||||
/// _target_ must be a non-directory
|
/// _target_ must be a non-directory
|
||||||
///
|
///
|
||||||
fn copy_file_to_file(file: &Path, target: &Path, b: &Behavior) -> i32 {
|
fn copy_file_to_file(file: &Path, target: &Path, b: &Behavior) -> i32 {
|
||||||
if copy(file, &target, b).is_err() {
|
if copy(file, target, b).is_err() {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
@ -563,7 +563,7 @@ fn copy(from: &Path, to: &Path, b: &Behavior) -> Result<(), ()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if mode::chmod(&to, b.mode()).is_err() {
|
if mode::chmod(to, b.mode()).is_err() {
|
||||||
return Err(());
|
return Err(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue