File tree 3 files changed +6
-9
lines changed
3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -627,19 +627,17 @@ impl DisplayBuffer {
627
627
impl core:: fmt:: Display for DisplayBuffer {
628
628
#[ inline]
629
629
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
630
- let s = self . as_str ( ) ;
631
- write ! ( f, "{s}" )
630
+ f. write_str ( self . as_str ( ) )
632
631
}
633
632
}
634
633
635
634
#[ derive( Copy , Clone , Default , Debug ) ]
636
- struct NullFormatter < D : core :: fmt :: Display > ( D ) ;
635
+ struct NullFormatter ( & ' static str ) ;
637
636
638
- impl < D : core:: fmt:: Display > core :: fmt :: Display for NullFormatter < D > {
637
+ impl core:: fmt:: Display for NullFormatter {
639
638
#[ inline]
640
639
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
641
- let d = & self . 0 ;
642
- write ! ( f, "{d}" )
640
+ f. write_str ( self . 0 )
643
641
}
644
642
}
645
643
Original file line number Diff line number Diff line change @@ -323,8 +323,7 @@ impl core::fmt::Display for EffectsDisplay {
323
323
#[ inline]
324
324
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
325
325
for index in self . 0 . index_iter ( ) {
326
- let escape = METADATA [ index] . escape ;
327
- write ! ( f, "{escape}" ) ?;
326
+ f. write_str ( METADATA [ index] . escape ) ?;
328
327
}
329
328
Ok ( ( ) )
330
329
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ impl Reset {
15
15
16
16
impl core:: fmt:: Display for Reset {
17
17
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
18
- write ! ( f , "{ RESET}" )
18
+ f . write_str ( RESET )
19
19
}
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments