@@ -434,9 +434,9 @@ impl<'a> fmt::Display for Display<'a> {
434
434
}
435
435
if let ( true , Cfg :: Cfg ( _, Some ( feat) ) ) = ( short_longhand, sub_cfg) {
436
436
if self . 1 . is_html ( ) {
437
- write ! ( fmt, "<code>{}</code>" , feat ) ?;
437
+ write ! ( fmt, "<code>{feat }</code>" ) ?;
438
438
} else {
439
- write ! ( fmt, "`{}`" , feat ) ?;
439
+ write ! ( fmt, "`{feat }`" ) ?;
440
440
}
441
441
} else {
442
442
write_with_opt_paren ( fmt, !sub_cfg. is_all ( ) , Display ( sub_cfg, self . 1 ) ) ?;
@@ -471,9 +471,9 @@ impl<'a> fmt::Display for Display<'a> {
471
471
}
472
472
if let ( true , Cfg :: Cfg ( _, Some ( feat) ) ) = ( short_longhand, sub_cfg) {
473
473
if self . 1 . is_html ( ) {
474
- write ! ( fmt, "<code>{}</code>" , feat ) ?;
474
+ write ! ( fmt, "<code>{feat }</code>" ) ?;
475
475
} else {
476
- write ! ( fmt, "`{}`" , feat ) ?;
476
+ write ! ( fmt, "`{feat }`" ) ?;
477
477
}
478
478
} else {
479
479
write_with_opt_paren ( fmt, !sub_cfg. is_simple ( ) , Display ( sub_cfg, self . 1 ) ) ?;
@@ -552,21 +552,21 @@ impl<'a> fmt::Display for Display<'a> {
552
552
"sgx" => "SGX" ,
553
553
_ => "" ,
554
554
} ,
555
- ( sym:: target_endian, Some ( endian) ) => return write ! ( fmt, "{}-endian" , endian ) ,
556
- ( sym:: target_pointer_width, Some ( bits) ) => return write ! ( fmt, "{}-bit" , bits ) ,
555
+ ( sym:: target_endian, Some ( endian) ) => return write ! ( fmt, "{endian }-endian" ) ,
556
+ ( sym:: target_pointer_width, Some ( bits) ) => return write ! ( fmt, "{bits }-bit" ) ,
557
557
( sym:: target_feature, Some ( feat) ) => match self . 1 {
558
558
Format :: LongHtml => {
559
- return write ! ( fmt, "target feature <code>{}</code>" , feat ) ;
559
+ return write ! ( fmt, "target feature <code>{feat }</code>" ) ;
560
560
}
561
- Format :: LongPlain => return write ! ( fmt, "target feature `{}`" , feat ) ,
562
- Format :: ShortHtml => return write ! ( fmt, "<code>{}</code>" , feat ) ,
561
+ Format :: LongPlain => return write ! ( fmt, "target feature `{feat }`" ) ,
562
+ Format :: ShortHtml => return write ! ( fmt, "<code>{feat }</code>" ) ,
563
563
} ,
564
564
( sym:: feature, Some ( feat) ) => match self . 1 {
565
565
Format :: LongHtml => {
566
- return write ! ( fmt, "crate feature <code>{}</code>" , feat ) ;
566
+ return write ! ( fmt, "crate feature <code>{feat }</code>" ) ;
567
567
}
568
- Format :: LongPlain => return write ! ( fmt, "crate feature `{}`" , feat ) ,
569
- Format :: ShortHtml => return write ! ( fmt, "<code>{}</code>" , feat ) ,
568
+ Format :: LongPlain => return write ! ( fmt, "crate feature `{feat }`" ) ,
569
+ Format :: ShortHtml => return write ! ( fmt, "<code>{feat }</code>" ) ,
570
570
} ,
571
571
_ => "" ,
572
572
} ;
@@ -581,12 +581,12 @@ impl<'a> fmt::Display for Display<'a> {
581
581
Escape ( v. as_str( ) )
582
582
)
583
583
} else {
584
- write ! ( fmt, r#"`{}="{}"`"# , name , v )
584
+ write ! ( fmt, r#"`{name }="{v }"`"# )
585
585
}
586
586
} else if self . 1 . is_html ( ) {
587
587
write ! ( fmt, "<code>{}</code>" , Escape ( name. as_str( ) ) )
588
588
} else {
589
- write ! ( fmt, "`{}`" , name )
589
+ write ! ( fmt, "`{name }`" )
590
590
}
591
591
}
592
592
}
0 commit comments