@@ -517,7 +517,7 @@ impl FormatSpec {
517
517
} else {
518
518
""
519
519
} ;
520
- let raw_magnitude_str: Result < String , FormatSpecError > = match self . format_type {
520
+ let raw_magnitude_str = match self . format_type {
521
521
Some ( FormatType :: Binary ) => self . format_int_radix ( magnitude, 2 ) ,
522
522
Some ( FormatType :: Decimal ) => self . format_int_radix ( magnitude, 10 ) ,
523
523
Some ( FormatType :: Octal ) => self . format_int_radix ( magnitude, 8 ) ,
@@ -548,7 +548,7 @@ impl FormatSpec {
548
548
_ => Err ( FormatSpecError :: UnableToConvert ) ,
549
549
} ,
550
550
None => self . format_int_radix ( magnitude, 10 ) ,
551
- } ;
551
+ } ? ;
552
552
let format_sign = self . sign . unwrap_or ( FormatSign :: Minus ) ;
553
553
let sign_str = match num. sign ( ) {
554
554
Sign :: Minus => "-" ,
@@ -559,7 +559,7 @@ impl FormatSpec {
559
559
} ,
560
560
} ;
561
561
let sign_prefix = format ! ( "{sign_str}{prefix}" ) ;
562
- let magnitude_str = self . add_magnitude_separators ( raw_magnitude_str? , & sign_prefix) ;
562
+ let magnitude_str = self . add_magnitude_separators ( raw_magnitude_str, & sign_prefix) ;
563
563
self . format_sign_and_align (
564
564
& BorrowedStr :: from_bytes ( magnitude_str. as_bytes ( ) ) ,
565
565
& sign_prefix,
0 commit comments