forked from extern/nushell
fix clippy warnings
This commit is contained in:
parent
28b26ca44d
commit
5bd20e4d36
@ -101,7 +101,7 @@ impl Command for Cp {
|
||||
sources.remove(index);
|
||||
}
|
||||
|
||||
if sources.len() == 0 {
|
||||
if sources.is_empty() {
|
||||
return Err(ShellError::NoFileToBeCopied());
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ impl Command for Mv {
|
||||
sources.remove(index);
|
||||
}
|
||||
|
||||
if sources.len() == 0 {
|
||||
if sources.is_empty() {
|
||||
return Err(ShellError::NoFileToBeMoved());
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ fn rm(context: &EvaluationContext, call: &Call) -> Result<Value, ShellError> {
|
||||
targets.remove(index);
|
||||
}
|
||||
|
||||
if targets.len() == 0 {
|
||||
if targets.is_empty() {
|
||||
return Err(ShellError::NoFileToBeRemoved());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user