File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -561,11 +561,7 @@ impl FormatSpec {
561561 } ,
562562 } ;
563563
564- self . format_sign_and_align (
565- & AsciiStr :: new ( & magnitude_str) ,
566- sign_str,
567- FormatAlign :: Right ,
568- )
564+ self . format_sign_and_align ( & AsciiStr :: new ( & magnitude_str) , sign_str, FormatAlign :: Right )
569565 }
570566
571567 /// Format a float with locale-aware 'n' format.
@@ -637,9 +633,7 @@ impl FormatSpec {
637633
638634 let precision = self . precision . unwrap_or ( 6 ) ;
639635 let format_type = match self . format_type {
640- Some ( FormatType :: Number ( case) ) => {
641- FormatType :: GeneralFormat ( case)
642- }
636+ Some ( FormatType :: Number ( case) ) => FormatType :: GeneralFormat ( case) ,
643637 _ => return self . format_complex ( num) ,
644638 } ;
645639
@@ -672,7 +666,11 @@ impl FormatSpec {
672666
673667 let has_re = re_str. is_some ( ) ;
674668 let formatted = if let Some ( re_str) = re_str {
675- let sep = if num. im >= 0.0 || num. im . is_nan ( ) { "+" } else { "" } ;
669+ let sep = if num. im >= 0.0 || num. im . is_nan ( ) {
670+ "+"
671+ } else {
672+ ""
673+ } ;
676674 format ! ( "({re_str}{sep}{im_sign}{im_grouped}j)" )
677675 } else {
678676 format ! ( "{im_sign}{im_grouped}j" )
You can’t perform that action at this time.
0 commit comments