From 6731e3542d45e6098d3615fe6b7e9dde5bc10e92 Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Sun, 19 Sep 2021 22:05:24 +0100 Subject: [PATCH] clippy errors --- crates/nu-cli/src/errors.rs | 2 +- crates/nu-command/src/run_external.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-cli/src/errors.rs b/crates/nu-cli/src/errors.rs index 4c04481fe0..fc63b34714 100644 --- a/crates/nu-cli/src/errors.rs +++ b/crates/nu-cli/src/errors.rs @@ -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()) ]) } }; diff --git a/crates/nu-command/src/run_external.rs b/crates/nu-command/src/run_external.rs index 15204ba377..e89e471eda 100644 --- a/crates/nu-command/src/run_external.rs +++ b/crates/nu-command/src/run_external.rs @@ -46,7 +46,7 @@ impl<'call, 'contex> ExternalCommand<'call, 'contex> { call: &'call Call, context: &'contex EvaluationContext, ) -> Result { - if call.positional.len() == 0 { + if call.positional.is_empty() { return Err(ShellError::ExternalNotSupported(call.head)); }