File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -635,10 +635,11 @@ impl HelpTemplate<'_, '_> {
635635 let trailing_indent = self . get_spaces ( trailing_indent) ;
636636
637637 let mut help = about. clone ( ) ;
638+ let mut help_is_empty = help. is_empty ( ) ;
638639 help. replace_newline_var ( ) ;
639640
640641 if !spec_vals. is_empty ( ) {
641- if !help . is_empty ( ) {
642+ if !help_is_empty {
642643 let sep = if self . use_long && arg. is_some ( ) {
643644 "\n \n "
644645 } else {
@@ -647,6 +648,7 @@ impl HelpTemplate<'_, '_> {
647648 help. push_str ( sep) ;
648649 }
649650 help. push_str ( spec_vals) ;
651+ help_is_empty = help. is_empty ( ) ;
650652 }
651653
652654 let avail_chars = self . term_w . saturating_sub ( spaces) ;
@@ -658,7 +660,6 @@ impl HelpTemplate<'_, '_> {
658660 ) ;
659661 help. wrap ( avail_chars) ;
660662 help. indent ( "" , & trailing_indent) ;
661- let help_is_empty = help. is_empty ( ) ;
662663 self . writer . push_styled ( & help) ;
663664
664665 if let Some ( arg) = arg {
You can’t perform that action at this time.
0 commit comments