Fix a bunch of future clippy warnings (#3586)

* Fix a bunch of future clippy warnings

* Fix a bunch of future clippy warnings
This commit is contained in:
JT
2021-06-10 07:08:12 +12:00
committed by GitHub
parent e8a2250ef8
commit 383e874166
86 changed files with 237 additions and 258 deletions

View File

@ -105,9 +105,9 @@ impl DirInfo {
match f {
Ok(i) => match i.file_type() {
Ok(t) if t.is_dir() => {
s = s.add_dir(i.path(), depth, &params, ctrl_c.clone())
s = s.add_dir(i.path(), depth, params, ctrl_c.clone())
}
Ok(_t) => s = s.add_file(i.path(), &params),
Ok(_t) => s = s.add_file(i.path(), params),
Err(e) => s = s.add_error(e.into()),
},
Err(e) => s = s.add_error(e.into()),
@ -134,7 +134,7 @@ impl DirInfo {
}
}
let d = DirInfo::new(path, &params, depth, ctrl_c);
let d = DirInfo::new(path, params, depth, ctrl_c);
self.size += d.size;
self.blocks += d.blocks;
self.dirs.push(d);

View File

@ -931,7 +931,7 @@ fn move_file(from: TaggedPathBuf, to: TaggedPathBuf) -> Result<(), ShellError> {
to.push(from_file_name);
}
move_item(&from, from_tag, &to)
move_item(from, from_tag, &to)
}
fn move_item(from: &Path, from_tag: &Tag, to: &Path) -> Result<(), ShellError> {

View File

@ -185,7 +185,7 @@ mod tests {
let mut res = FileStructure::new();
res.walk_decorate(&dirs.test())
res.walk_decorate(dirs.test())
.expect("Can not decorate files traversal.");
assert_eq!(