mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 23:23:12 +01:00
clippy errors
This commit is contained in:
parent
5a6aebfcb2
commit
6731e3542d
@ -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 New Issue
Block a user