@@ -346,10 +346,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
346346 }
347347
348348 FormatElement :: SourcePosition ( position) => {
349- write ! (
350- f,
351- [ text( & std:: format!( "source_position({position:?})" ) , None ) ]
352- ) ?;
349+ write ! ( f, [ text( & std:: format!( "source_position({position:?})" ) ) ] ) ?;
353350 }
354351
355352 FormatElement :: LineSuffixBoundary => {
@@ -360,7 +357,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
360357 write ! ( f, [ token( "best_fitting(" ) ] ) ?;
361358
362359 if * mode != BestFittingMode :: FirstLine {
363- write ! ( f, [ text( & std:: format!( "mode: {mode:?}, " ) , None ) ] ) ?;
360+ write ! ( f, [ text( & std:: format!( "mode: {mode:?}, " ) ) ] ) ?;
364361 }
365362
366363 write ! ( f, [ token( "[" ) ] ) ?;
@@ -392,17 +389,14 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
392389 write ! (
393390 f,
394391 [
395- text( & std:: format!( "<interned {index}>" ) , None ) ,
392+ text( & std:: format!( "<interned {index}>" ) ) ,
396393 space( ) ,
397394 &&* * interned,
398395 ]
399396 ) ?;
400397 }
401398 Some ( reference) => {
402- write ! (
403- f,
404- [ text( & std:: format!( "<ref interned *{reference}>" ) , None ) ]
405- ) ?;
399+ write ! ( f, [ text( & std:: format!( "<ref interned *{reference}>" ) ) ] ) ?;
406400 }
407401 }
408402 }
@@ -421,7 +415,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
421415 f,
422416 [
423417 token( "<END_TAG_WITHOUT_START<" ) ,
424- text( & std:: format!( "{:?}" , tag. kind( ) ) , None ) ,
418+ text( & std:: format!( "{:?}" , tag. kind( ) ) ) ,
425419 token( ">>" ) ,
426420 ]
427421 ) ?;
@@ -436,9 +430,9 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
436430 token( ")" ) ,
437431 soft_line_break_or_space( ) ,
438432 token( "ERROR<START_END_TAG_MISMATCH<start: " ) ,
439- text( & std:: format!( "{start_kind:?}" ) , None ) ,
433+ text( & std:: format!( "{start_kind:?}" ) ) ,
440434 token( ", end: " ) ,
441- text( & std:: format!( "{:?}" , tag. kind( ) ) , None ) ,
435+ text( & std:: format!( "{:?}" , tag. kind( ) ) ) ,
442436 token( ">>" )
443437 ]
444438 ) ?;
@@ -470,7 +464,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
470464 f,
471465 [
472466 token( "align(" ) ,
473- text( & count. to_string( ) , None ) ,
467+ text( & count. to_string( ) ) ,
474468 token( "," ) ,
475469 space( ) ,
476470 ]
@@ -482,7 +476,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
482476 f,
483477 [
484478 token( "line_suffix(" ) ,
485- text( & std:: format!( "{reserved_width:?}" ) , None ) ,
479+ text( & std:: format!( "{reserved_width:?}" ) ) ,
486480 token( "," ) ,
487481 space( ) ,
488482 ]
@@ -499,11 +493,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
499493 if let Some ( group_id) = group. id ( ) {
500494 write ! (
501495 f,
502- [
503- text( & std:: format!( "\" {group_id:?}\" " ) , None ) ,
504- token( "," ) ,
505- space( ) ,
506- ]
496+ [ text( & std:: format!( "\" {group_id:?}\" " ) ) , token( "," ) , space( ) , ]
507497 ) ?;
508498 }
509499
@@ -524,11 +514,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
524514 if let Some ( group_id) = id {
525515 write ! (
526516 f,
527- [
528- text( & std:: format!( "\" {group_id:?}\" " ) , None ) ,
529- token( "," ) ,
530- space( ) ,
531- ]
517+ [ text( & std:: format!( "\" {group_id:?}\" " ) ) , token( "," ) , space( ) , ]
532518 ) ?;
533519 }
534520 }
@@ -561,7 +547,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
561547 f,
562548 [
563549 token( "indent_if_group_breaks(" ) ,
564- text( & std:: format!( "\" {id:?}\" " ) , None ) ,
550+ text( & std:: format!( "\" {id:?}\" " ) ) ,
565551 token( "," ) ,
566552 space( ) ,
567553 ]
@@ -581,11 +567,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
581567 if let Some ( group_id) = condition. group_id {
582568 write ! (
583569 f,
584- [
585- text( & std:: format!( "\" {group_id:?}\" " ) , None ) ,
586- token( "," ) ,
587- space( ) ,
588- ]
570+ [ text( & std:: format!( "\" {group_id:?}\" " ) ) , token( "," ) , space( ) ]
589571 ) ?;
590572 }
591573 }
@@ -595,7 +577,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
595577 f,
596578 [
597579 token( "label(" ) ,
598- text( & std:: format!( "\" {label_id:?}\" " ) , None ) ,
580+ text( & std:: format!( "\" {label_id:?}\" " ) ) ,
599581 token( "," ) ,
600582 space( ) ,
601583 ]
@@ -664,7 +646,7 @@ impl Format<IrFormatContext<'_>> for &[FormatElement] {
664646 ContentArrayEnd ,
665647 token( ")" ) ,
666648 soft_line_break_or_space( ) ,
667- text( & std:: format!( "<START_WITHOUT_END<{top:?}>>" ) , None ) ,
649+ text( & std:: format!( "<START_WITHOUT_END<{top:?}>>" ) ) ,
668650 ]
669651 ) ?;
670652 }
@@ -807,7 +789,7 @@ impl Format<IrFormatContext<'_>> for Condition {
807789 f,
808790 [
809791 token( "if_group_fits_on_line(" ) ,
810- text( & std:: format!( "\" {id:?}\" " ) , None ) ,
792+ text( & std:: format!( "\" {id:?}\" " ) ) ,
811793 token( ")" )
812794 ]
813795 ) ,
@@ -816,7 +798,7 @@ impl Format<IrFormatContext<'_>> for Condition {
816798 f,
817799 [
818800 token( "if_group_breaks(" ) ,
819- text( & std:: format!( "\" {id:?}\" " ) , None ) ,
801+ text( & std:: format!( "\" {id:?}\" " ) ) ,
820802 token( ")" )
821803 ]
822804 ) ,
0 commit comments