@@ -64,7 +64,7 @@ fn main() -> io::Result<()> {
6464 for platform in [ "unix" , "macos" , "windows" , "unix_android" ] {
6565 let platform_utils: Vec < String > = String :: from_utf8 (
6666 std:: process:: Command :: new ( "./util/show-utils.sh" )
67- . arg ( format ! ( "--features=feat_os_{}" , platform ) )
67+ . arg ( format ! ( "--features=feat_os_{platform}" ) )
6868 . output ( ) ?
6969 . stdout ,
7070 )
@@ -138,7 +138,7 @@ fn main() -> io::Result<()> {
138138 if name == "[" {
139139 continue ;
140140 }
141- let p = format ! ( "docs/src/utils/{}.md" , name ) ;
141+ let p = format ! ( "docs/src/utils/{name }.md" ) ;
142142
143143 let markdown = File :: open ( format ! ( "src/uu/{name}/{name}.md" ) )
144144 . and_then ( |mut f : File | {
@@ -158,11 +158,11 @@ fn main() -> io::Result<()> {
158158 markdown,
159159 }
160160 . markdown ( ) ?;
161- println ! ( "Wrote to '{}'" , p ) ;
161+ println ! ( "Wrote to '{p }'" ) ;
162162 } else {
163- println ! ( "Error writing to {}" , p ) ;
163+ println ! ( "Error writing to {p}" ) ;
164164 }
165- writeln ! ( summary, "* [{0 }](utils/{0 }.md)" , name ) ?;
165+ writeln ! ( summary, "* [{name }](utils/{name }.md)" ) ?;
166166 }
167167 Ok ( ( ) )
168168}
@@ -214,7 +214,7 @@ impl MDWriter<'_, '_> {
214214 . iter ( )
215215 . any ( |u| u == self . name )
216216 {
217- writeln ! ( self . w, "<i class=\" fa fa-brands fa-{}\" ></i>" , icon ) ?;
217+ writeln ! ( self . w, "<i class=\" fa fa-brands fa-{icon }\" ></i>" ) ?;
218218 }
219219 }
220220 writeln ! ( self . w, "</div>" ) ?;
@@ -242,7 +242,7 @@ impl MDWriter<'_, '_> {
242242 let usage = usage. replace ( "{}" , self . name ) ;
243243
244244 writeln ! ( self . w, "\n ```" ) ?;
245- writeln ! ( self . w, "{}" , usage ) ?;
245+ writeln ! ( self . w, "{usage}" ) ?;
246246 writeln ! ( self . w, "```" )
247247 } else {
248248 Ok ( ( ) )
@@ -293,14 +293,14 @@ impl MDWriter<'_, '_> {
293293 writeln ! ( self . w) ?;
294294 for line in content. lines ( ) . skip_while ( |l| !l. starts_with ( '-' ) ) {
295295 if let Some ( l) = line. strip_prefix ( "- " ) {
296- writeln ! ( self . w, "{}" , l ) ?;
296+ writeln ! ( self . w, "{l}" ) ?;
297297 } else if line. starts_with ( '`' ) {
298298 writeln ! ( self . w, "```shell\n {}\n ```" , line. trim_matches( '`' ) ) ?;
299299 } else if line. is_empty ( ) {
300300 writeln ! ( self . w) ?;
301301 } else {
302302 println ! ( "Not sure what to do with this line:" ) ;
303- println ! ( "{}" , line ) ;
303+ println ! ( "{line}" ) ;
304304 }
305305 }
306306 writeln ! ( self . w) ?;
@@ -332,14 +332,14 @@ impl MDWriter<'_, '_> {
332332 write ! ( self . w, ", " ) ?;
333333 }
334334 write ! ( self . w, "<code>" ) ?;
335- write ! ( self . w, "--{}" , l ) ?;
335+ write ! ( self . w, "--{l}" ) ?;
336336 if let Some ( names) = arg. get_value_names ( ) {
337337 write ! (
338338 self . w,
339339 "={}" ,
340340 names
341341 . iter( )
342- . map( |x| format!( "<{}>" , x ) )
342+ . map( |x| format!( "<{x }>" ) )
343343 . collect:: <Vec <_>>( )
344344 . join( " " )
345345 ) ?;
@@ -353,14 +353,14 @@ impl MDWriter<'_, '_> {
353353 write ! ( self . w, ", " ) ?;
354354 }
355355 write ! ( self . w, "<code>" ) ?;
356- write ! ( self . w, "-{}" , s ) ?;
356+ write ! ( self . w, "-{s}" ) ?;
357357 if let Some ( names) = arg. get_value_names ( ) {
358358 write ! (
359359 self . w,
360360 " {}" ,
361361 names
362362 . iter( )
363- . map( |x| format!( "<{}>" , x ) )
363+ . map( |x| format!( "<{x }>" ) )
364364 . collect:: <Vec <_>>( )
365365 . join( " " )
366366 ) ?;
0 commit comments