@@ -2837,8 +2837,8 @@ impl OwnedDFA {
28372837 }
28382838 assert ! (
28392839 !matches. contains_key( & start_id) ,
2840- "{:?} is both a start and a match state, which is not allowed" ,
2841- start_id ,
2840+ "{start_id :?} is both a start and a match state, \
2841+ which is not allowed" ,
28422842 ) ;
28432843 is_start. insert ( start_id) ;
28442844 }
@@ -3098,7 +3098,7 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
30983098 } else {
30993099 self . to_index ( state. id ( ) )
31003100 } ;
3101- write ! ( f, "{:06?}: " , id ) ?;
3101+ write ! ( f, "{id :06?}: " ) ?;
31023102 state. fmt ( f) ?;
31033103 write ! ( f, "\n " ) ?;
31043104 }
@@ -3114,11 +3114,11 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
31143114 Anchored :: No => writeln ! ( f, "START-GROUP(unanchored)" ) ?,
31153115 Anchored :: Yes => writeln ! ( f, "START-GROUP(anchored)" ) ?,
31163116 Anchored :: Pattern ( pid) => {
3117- writeln ! ( f, "START_GROUP(pattern: {:?})" , pid ) ?
3117+ writeln ! ( f, "START_GROUP(pattern: {pid :?})" ) ?
31183118 }
31193119 }
31203120 }
3121- writeln ! ( f, " {:?} => {:06?}" , sty , id ) ?;
3121+ writeln ! ( f, " {sty :?} => {id :06?}" ) ?;
31223122 }
31233123 if self . pattern_len ( ) > 1 {
31243124 writeln ! ( f, "" ) ?;
@@ -3129,13 +3129,13 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
31293129 } else {
31303130 self . to_index ( id)
31313131 } ;
3132- write ! ( f, "MATCH({:06?}): " , id ) ?;
3132+ write ! ( f, "MATCH({id :06?}): " ) ?;
31333133 for ( i, & pid) in self . ms . pattern_id_slice ( i) . iter ( ) . enumerate ( )
31343134 {
31353135 if i > 0 {
31363136 write ! ( f, ", " ) ?;
31373137 }
3138- write ! ( f, "{:?}" , pid ) ?;
3138+ write ! ( f, "{pid :?}" ) ?;
31393139 }
31403140 writeln ! ( f, "" ) ?;
31413141 }
@@ -3525,8 +3525,8 @@ impl TransitionTable<Vec<u32>> {
35253525 ///
35263526 /// Both id1 and id2 must point to valid states, otherwise this panics.
35273527 fn swap ( & mut self , id1 : StateID , id2 : StateID ) {
3528- assert ! ( self . is_valid( id1) , "invalid 'id1' state: {:?}" , id1 ) ;
3529- assert ! ( self . is_valid( id2) , "invalid 'id2' state: {:?}" , id2 ) ;
3528+ assert ! ( self . is_valid( id1) , "invalid 'id1' state: {id1 :?}" ) ;
3529+ assert ! ( self . is_valid( id2) , "invalid 'id2' state: {id2 :?}" ) ;
35303530 // We only need to swap the parts of the state that are used. So if the
35313531 // stride is 64, but the alphabet length is only 33, then we save a lot
35323532 // of work.
@@ -4277,7 +4277,7 @@ impl<T: AsMut<[u32]>> StartTable<T> {
42774277 let len = self
42784278 . pattern_len
42794279 . expect ( "start states for each pattern enabled" ) ;
4280- assert ! ( pid < len, "invalid pattern ID {:?}" , pid ) ;
4280+ assert ! ( pid < len, "invalid pattern ID {pid :?}" ) ;
42814281 self . stride
42824282 . checked_mul ( pid)
42834283 . unwrap ( )
@@ -4868,9 +4868,9 @@ impl<'a> fmt::Debug for State<'a> {
48684868 write ! ( f, ", " ) ?;
48694869 }
48704870 if start == end {
4871- write ! ( f, "{:?} => {:?}" , start , id ) ?;
4871+ write ! ( f, "{start :?} => {id :?}" ) ?;
48724872 } else {
4873- write ! ( f, "{:?}-{:?} => {:?}" , start , end , id ) ?;
4873+ write ! ( f, "{start :?}-{end :?} => {id :?}" ) ?;
48744874 }
48754875 }
48764876 Ok ( ( ) )
@@ -5135,7 +5135,7 @@ impl core::fmt::Display for BuildError {
51355135 match self . kind ( ) {
51365136 BuildErrorKind :: NFA ( _) => write ! ( f, "error building NFA" ) ,
51375137 BuildErrorKind :: Unsupported ( ref msg) => {
5138- write ! ( f, "unsupported regex feature for DFAs: {}" , msg )
5138+ write ! ( f, "unsupported regex feature for DFAs: {msg}" )
51395139 }
51405140 BuildErrorKind :: TooManyStates => write ! (
51415141 f,
@@ -5167,11 +5167,10 @@ impl core::fmt::Display for BuildError {
51675167 ) ,
51685168 BuildErrorKind :: DFAExceededSizeLimit { limit } => write ! (
51695169 f,
5170- "DFA exceeded size limit of {:?} during determinization" ,
5171- limit,
5170+ "DFA exceeded size limit of {limit:?} during determinization" ,
51725171 ) ,
51735172 BuildErrorKind :: DeterminizeExceededSizeLimit { limit } => {
5174- write ! ( f, "determinization exceeded size limit of {:?}" , limit )
5173+ write ! ( f, "determinization exceeded size limit of {limit :?}" )
51755174 }
51765175 }
51775176 }
0 commit comments