make cli format a bit saner

this looks more like pve/pmg cli tools now
without double the empty lines

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-03-18 16:27:38 +01:00 committed by Wolfgang Bumiller
parent d84f563d5b
commit d1bfafe157
2 changed files with 2 additions and 4 deletions

View File

@ -144,10 +144,10 @@ pub fn generate_usage_str(
let mut text = match format {
DocumentationFormat::Short => {
return format!("{}{}{}{}\n\n", indent, prefix, args, option_indicator);
return format!("{}{}{}{}\n", indent, prefix, args, option_indicator);
}
DocumentationFormat::Long => {
format!("{}{}{}{}\n\n", indent, prefix, args, option_indicator)
format!("{}{}{}{}\n", indent, prefix, args, option_indicator)
}
DocumentationFormat::Full => format!(
"{}{}{}{}\n\n{}\n\n",
@ -166,7 +166,6 @@ pub fn generate_usage_str(
if !options.is_empty() {
text.push_str("Optional parameters:\n\n");
text.push_str(&options);
text.push('\n');
}
text
}

View File

@ -150,7 +150,6 @@ pub fn get_property_description(
let indent = " ";
text.push('\n');
text.push_str(&wrap_text(indent, indent, descr, 80));
text.push('\n');
text
}