From e869100423d93fa3acff03c4620cbcc0d0e790a1 Mon Sep 17 00:00:00 2001 From: Kevin K Date: Thu, 2 Apr 2015 14:28:23 -0400 Subject: [PATCH] fix(help): fix formatting for option arguments with no long --- src/app.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app.rs b/src/app.rs index b31392ff..e3142a0e 100644 --- a/src/app.rs +++ b/src/app.rs @@ -549,19 +549,19 @@ impl<'a, 'v, 'ab, 'u, 'ar> App<'a, 'v, 'ab, 'u, 'ar>{ format!("{}--{}=", if v.short.is_some() {", "} else {""},l) } else { - "".to_owned() + " ".to_owned() }, format!("{}{}", v.name, if v.multiple{"..."} else {""}), if v.long.is_some() { self.get_spaces((longest_opt + 4) - (v.long.unwrap().len() + v.name.len() + 2 + mult)) } else { // 7 is '--=' (3) + tab (4) - self.get_spaces(longest_opt + 7) + self.get_spaces((longest_opt + 6) - (v.name.len() + mult)) }, if let Some(h) = v.help { format!("{}{}", h, if let Some(ref pv) = v.possible_vals { - format!(" [values:{}]", pv.iter().fold(String::new(), |acc, name| acc + &format!("{}",name)[..] )) + format!(" [values:{}]", pv.iter().fold(String::new(), |acc, name| acc + &format!(" {}",name)[..] )) }else{ "".to_owned() })