From b809d86d738d49a9c0bbc2b303fe80956a280f3a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 18 Oct 2024 17:29:17 +0200 Subject: [PATCH] cli: format: switch some format strings to inline template variables Signed-off-by: Thomas Lamprecht --- proxmox-router/src/cli/format.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/proxmox-router/src/cli/format.rs b/proxmox-router/src/cli/format.rs index a35821a6..84936336 100644 --- a/proxmox-router/src/cli/format.rs +++ b/proxmox-router/src/cli/format.rs @@ -183,22 +183,15 @@ pub(crate) fn generate_usage_str_do<'cli>( let mut text = match format { DocumentationFormat::Short => { - return format!("{}{}{}{}", indent, prefix, args, option_indicator); + return format!("{indent}{prefix}{args}{option_indicator}"); } - DocumentationFormat::Long => format!("{}{}{}{}", indent, prefix, args, option_indicator), + DocumentationFormat::Long => format!("{indent}{prefix}{args}{option_indicator}"), DocumentationFormat::Full => format!( - "{}{}{}{}\n\n{}", - indent, - prefix, - args, - option_indicator, + "{indent}{prefix}{args}{option_indicator}\n\n{}", schema.description() ), DocumentationFormat::ReST => format!( - "``{}{}{}``\n\n{}", - prefix, - args, - option_indicator, + "``{prefix}{args}{option_indicator}``\n\n{}", schema.description() ), };