mirror of
https://github.com/nushell/nushell.git
synced 2025-08-13 09:45:15 +02:00
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:
@ -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, ¶ms, ctrl_c.clone())
|
||||
s = s.add_dir(i.path(), depth, params, ctrl_c.clone())
|
||||
}
|
||||
Ok(_t) => s = s.add_file(i.path(), ¶ms),
|
||||
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, ¶ms, depth, ctrl_c);
|
||||
let d = DirInfo::new(path, params, depth, ctrl_c);
|
||||
self.size += d.size;
|
||||
self.blocks += d.blocks;
|
||||
self.dirs.push(d);
|
||||
|
@ -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> {
|
||||
|
@ -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!(
|
||||
|
Reference in New Issue
Block a user