@@ -308,13 +308,7 @@ impl FormattingOptions {
308308 /// - no [`DebugAsHex`] output mode.
309309 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
310310 pub const fn new ( ) -> Self {
311- Self {
312- flags : 0 ,
313- fill : ' ' ,
314- align : None ,
315- width : None ,
316- precision : None ,
317- }
311+ Self { flags : 0 , fill : ' ' , align : None , width : None , precision : None }
318312 }
319313
320314 /// Sets or removes the sign (the `+` or the `-` flag).
@@ -327,9 +321,10 @@ impl FormattingOptions {
327321 /// - `-`: Currently not used
328322 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
329323 pub const fn sign ( & mut self , sign : Option < Sign > ) -> & mut Self {
330- self . flags = self . flags & !( 1 << rt:: Flag :: SignMinus as u32 | 1 << rt:: Flag :: SignPlus as u32 ) ;
324+ self . flags =
325+ self . flags & !( 1 << rt:: Flag :: SignMinus as u32 | 1 << rt:: Flag :: SignPlus as u32 ) ;
331326 match sign {
332- None => { } ,
327+ None => { }
333328 Some ( Sign :: Plus ) => self . flags |= 1 << rt:: Flag :: SignPlus as u32 ,
334329 Some ( Sign :: Minus ) => self . flags |= 1 << rt:: Flag :: SignMinus as u32 ,
335330 }
@@ -413,9 +408,10 @@ impl FormattingOptions {
413408 /// hexadecimal or normal integers
414409 #[ unstable( feature = "formatting_options" , issue = "118117" ) ]
415410 pub const fn debug_as_hex ( & mut self , debug_as_hex : Option < DebugAsHex > ) -> & mut Self {
416- self . flags = self . flags & !( 1 << rt:: Flag :: DebugUpperHex as u32 | 1 << rt:: Flag :: DebugLowerHex as u32 ) ;
411+ self . flags = self . flags
412+ & !( 1 << rt:: Flag :: DebugUpperHex as u32 | 1 << rt:: Flag :: DebugLowerHex as u32 ) ;
417413 match debug_as_hex {
418- None => { } ,
414+ None => { }
419415 Some ( DebugAsHex :: Upper ) => self . flags |= 1 << rt:: Flag :: DebugUpperHex as u32 ,
420416 Some ( DebugAsHex :: Lower ) => self . flags |= 1 << rt:: Flag :: DebugLowerHex as u32 ,
421417 }
@@ -469,7 +465,9 @@ impl FormattingOptions {
469465 pub const fn get_debug_as_hex ( & self ) -> Option < DebugAsHex > {
470466 const DEBUG_UPPER_BITFIELD : u32 = 1 << rt:: Flag :: DebugUpperHex as u32 ;
471467 const DEBUG_LOWER_BITFIELD : u32 = 1 << rt:: Flag :: DebugLowerHex as u32 ;
472- match self . flags & ( ( 1 << rt:: Flag :: DebugUpperHex as u32 ) | ( 1 << rt:: Flag :: DebugLowerHex as u32 ) ) {
468+ match self . flags
469+ & ( ( 1 << rt:: Flag :: DebugUpperHex as u32 ) | ( 1 << rt:: Flag :: DebugLowerHex as u32 ) )
470+ {
473471 DEBUG_UPPER_BITFIELD => Some ( DebugAsHex :: Upper ) ,
474472 DEBUG_LOWER_BITFIELD => Some ( DebugAsHex :: Lower ) ,
475473 0 => None ,
0 commit comments