mirror of
https://github.com/nushell/nushell
synced 2025-01-14 06:04:09 +00:00
clippy errors
This commit is contained in:
parent
5a6aebfcb2
commit
6731e3542d
2 changed files with 2 additions and 2 deletions
|
@ -401,7 +401,7 @@ pub fn report_shell_error(
|
|||
Diagnostic::error()
|
||||
.with_message("External command")
|
||||
.with_labels(vec![
|
||||
Label::primary(diag_file_id, diag_range).with_message(format!("{}", error))
|
||||
Label::primary(diag_file_id, diag_range).with_message(error.to_string())
|
||||
])
|
||||
}
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ impl<'call, 'contex> ExternalCommand<'call, 'contex> {
|
|||
call: &'call Call,
|
||||
context: &'contex EvaluationContext,
|
||||
) -> Result<Self, ShellError> {
|
||||
if call.positional.len() == 0 {
|
||||
if call.positional.is_empty() {
|
||||
return Err(ShellError::ExternalNotSupported(call.head));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue