mirror of
https://github.com/nushell/nushell.git
synced 2025-08-14 20:30:33 +02:00
Fix easy clippy lints from latest stable (#16053)
1.88.0 was released today, clippy now lints (machine-applicable) against: - format strings with empty braces that could be inlined - easy win - `manual_abs_diff` - returning of a stored result of the last expression. - this can be somewhat contentious but touched only a few places
This commit is contained in:
committed by
GitHub
parent
372d576846
commit
9da0f41ebb
@ -663,7 +663,7 @@ fn print_help(plugin: &impl Plugin, encoder: impl PluginEncoder) {
|
||||
.as_ref()
|
||||
.map(|stem| stem.to_string_lossy().into_owned())
|
||||
.unwrap_or_else(|| "(unknown)".into());
|
||||
println!("Plugin file path: {}", plugin_name);
|
||||
println!("Plugin file path: {plugin_name}");
|
||||
|
||||
let mut help = String::new();
|
||||
let help_style = HelpStyle::default();
|
||||
@ -685,7 +685,7 @@ fn print_help(plugin: &impl Plugin, encoder: impl PluginEncoder) {
|
||||
})
|
||||
.and_then(|_| {
|
||||
let flags = get_flags_section(&signature, &help_style, |v| match v {
|
||||
FormatterValue::DefaultValue(value) => format!("{:#?}", value),
|
||||
FormatterValue::DefaultValue(value) => format!("{value:#?}"),
|
||||
FormatterValue::CodeString(text) => text.to_string(),
|
||||
});
|
||||
write!(help, "{flags}")
|
||||
|
Reference in New Issue
Block a user