clippy errors

This commit is contained in:
Fernando Herrera 2021-09-19 22:05:24 +01:00
parent 5a6aebfcb2
commit 6731e3542d
2 changed files with 2 additions and 2 deletions

View File

@ -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())
])
}
};

View File

@ -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));
}