mirror of
https://github.com/nushell/nushell
synced 2025-01-15 14:44:14 +00:00
fix clippy warnings
This commit is contained in:
parent
28b26ca44d
commit
5bd20e4d36
3 changed files with 3 additions and 3 deletions
|
@ -101,7 +101,7 @@ impl Command for Cp {
|
||||||
sources.remove(index);
|
sources.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if sources.len() == 0 {
|
if sources.is_empty() {
|
||||||
return Err(ShellError::NoFileToBeCopied());
|
return Err(ShellError::NoFileToBeCopied());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ impl Command for Mv {
|
||||||
sources.remove(index);
|
sources.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if sources.len() == 0 {
|
if sources.is_empty() {
|
||||||
return Err(ShellError::NoFileToBeMoved());
|
return Err(ShellError::NoFileToBeMoved());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ fn rm(context: &EvaluationContext, call: &Call) -> Result<Value, ShellError> {
|
||||||
targets.remove(index);
|
targets.remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
if targets.len() == 0 {
|
if targets.is_empty() {
|
||||||
return Err(ShellError::NoFileToBeRemoved());
|
return Err(ShellError::NoFileToBeRemoved());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue