@@ -80,7 +80,9 @@ impl<'a> DebugStruct<'a> {
8080 pub fn finish ( & mut self ) -> Result {
8181 if self . has_fields {
8282 let empty_spec = FormatSpec :: new ( ) ;
83- self . result = self . result . and_then ( |_| self . writer . write_str ( " }" , & empty_spec) ) ;
83+ self . result = self
84+ . result
85+ . and_then ( |_| self . writer . write_str ( " }" , & empty_spec) ) ;
8486 }
8587 self . result
8688 }
@@ -426,7 +428,10 @@ impl<'a> DebugMap<'a> {
426428 F : FnOnce ( Writer ) -> Result ,
427429 {
428430 self . result = self . result . and_then ( |_| {
429- assert ! ( self . has_key, "attempted to format a map value before its key" ) ;
431+ assert ! (
432+ self . has_key,
433+ "attempted to format a map value before its key"
434+ ) ;
430435 value_fmt ( self . writer ) ?;
431436 self . has_key = false ;
432437 Ok ( ( ) )
@@ -452,7 +457,10 @@ impl<'a> DebugMap<'a> {
452457 /// Marks the map as non-exhaustive, indicating to the reader that there are some other entries that are not shown in the debug representation.
453458 pub fn finish_non_exhaustive ( & mut self ) -> Result {
454459 self . result = self . result . and_then ( |_| {
455- assert ! ( !self . has_key, "attempted to finish a map with a partial entry" ) ;
460+ assert ! (
461+ !self . has_key,
462+ "attempted to finish a map with a partial entry"
463+ ) ;
456464
457465 let empty_spec = FormatSpec :: new ( ) ;
458466 if self . has_fields {
@@ -472,7 +480,10 @@ impl<'a> DebugMap<'a> {
472480 /// Otherwise this method will panic.
473481 pub fn finish ( & mut self ) -> Result {
474482 self . result = self . result . and_then ( |_| {
475- assert ! ( !self . has_key, "attempted to finish a map with a partial entry" ) ;
483+ assert ! (
484+ !self . has_key,
485+ "attempted to finish a map with a partial entry"
486+ ) ;
476487 let empty_spec = FormatSpec :: new ( ) ;
477488 self . writer . write_str ( "}" , & empty_spec)
478489 } ) ;
@@ -740,7 +751,10 @@ mod tests {
740751 . finish_non_exhaustive ( )
741752 . map_err ( |_| panic ! ( "failed to finish" ) ) ;
742753
743- assert_eq ! ( writer. get( ) , "{\" first\" : 123, \" second\" : 456, \" third\" : 789, ..}" ) ;
754+ assert_eq ! (
755+ writer. get( ) ,
756+ "{\" first\" : 123, \" second\" : 456, \" third\" : 789, ..}"
757+ ) ;
744758 }
745759
746760 #[ test]
0 commit comments