From 9ebb5c3385b60ccac4160ccb778d1405434df592 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 25 Apr 2025 15:36:33 +0800 Subject: [PATCH] lint/fmt fixes --- .../nu-cmd-extra/src/extra/strings/format/command.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/nu-cmd-extra/src/extra/strings/format/command.rs b/crates/nu-cmd-extra/src/extra/strings/format/command.rs index ce9688f605..c276c20be3 100644 --- a/crates/nu-cmd-extra/src/extra/strings/format/command.rs +++ b/crates/nu-cmd-extra/src/extra/strings/format/command.rs @@ -31,8 +31,7 @@ impl Command for FormatPattern { fn description(&self) -> &str { r"Format values into a string using either a simple pattern or `printf`-compatible pattern. Simple pattern supports input of type list, table, and record; -`printf` pattern supports input types that are coercible to string, namely bool, int, float, string, glob, binary and date, and also list of a mix of those types. - " +`printf` pattern supports input types that are coercible to string, namely bool, int, float, string, glob, binary and date, and also list of a mix of those types." } fn run( @@ -289,9 +288,8 @@ fn assert_specifier_count_eq_arg_count( msg: format!( "Number of arguments ({}) provided does not match the number of specifiers ({}) given in the pattern.", arg_count, spec_count, - ) - .into(), - span: span, + ), + span, }) } else { Ok(()) @@ -320,7 +318,7 @@ fn format_printf( .map(Value::coerce_into_string) .collect::, _>>()? } - v @ Value::Nothing {..} => { + v @ Value::Nothing { .. } => { assert_specifier_count_eq_arg_count(spec_count, 0, v.span())?; vec![] }