File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -189,14 +189,16 @@ impl Cfg {
189
189
}
190
190
191
191
/// Renders the configuration for long display, as a long plain text description.
192
- pub ( crate ) fn render_long_plain ( & self ) -> String {
192
+ pub ( crate ) fn render_long_plain ( & self ) -> impl fmt :: Display + ' _ {
193
193
let on = if self . should_use_with_in_description ( ) { "with" } else { "on" } ;
194
194
195
- let mut msg = format ! ( "Available {on} {}" , Display ( self , Format :: LongPlain ) ) ;
196
- if self . should_append_only_to_description ( ) {
197
- msg. push_str ( " only" ) ;
198
- }
199
- msg
195
+ fmt:: from_fn ( move |f| {
196
+ write ! ( f, "Available {on} {}" , Display ( self , Format :: LongPlain ) ) ?;
197
+ if self . should_append_only_to_description ( ) {
198
+ f. write_str ( " only" ) ?;
199
+ }
200
+ Ok ( ( ) )
201
+ } )
200
202
}
201
203
202
204
fn should_capitalize_first_letter ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments