@@ -2837,8 +2837,8 @@ impl OwnedDFA {
2837
2837
}
2838
2838
assert ! (
2839
2839
!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" ,
2842
2842
) ;
2843
2843
is_start. insert ( start_id) ;
2844
2844
}
@@ -3098,7 +3098,7 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3098
3098
} else {
3099
3099
self . to_index ( state. id ( ) )
3100
3100
} ;
3101
- write ! ( f, "{:06?}: " , id ) ?;
3101
+ write ! ( f, "{id :06?}: " ) ?;
3102
3102
state. fmt ( f) ?;
3103
3103
write ! ( f, "\n " ) ?;
3104
3104
}
@@ -3114,11 +3114,11 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3114
3114
Anchored :: No => writeln ! ( f, "START-GROUP(unanchored)" ) ?,
3115
3115
Anchored :: Yes => writeln ! ( f, "START-GROUP(anchored)" ) ?,
3116
3116
Anchored :: Pattern ( pid) => {
3117
- writeln ! ( f, "START_GROUP(pattern: {:?})" , pid ) ?
3117
+ writeln ! ( f, "START_GROUP(pattern: {pid :?})" ) ?
3118
3118
}
3119
3119
}
3120
3120
}
3121
- writeln ! ( f, " {:?} => {:06?}" , sty , id ) ?;
3121
+ writeln ! ( f, " {sty :?} => {id :06?}" ) ?;
3122
3122
}
3123
3123
if self . pattern_len ( ) > 1 {
3124
3124
writeln ! ( f, "" ) ?;
@@ -3129,13 +3129,13 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3129
3129
} else {
3130
3130
self . to_index ( id)
3131
3131
} ;
3132
- write ! ( f, "MATCH({:06?}): " , id ) ?;
3132
+ write ! ( f, "MATCH({id :06?}): " ) ?;
3133
3133
for ( i, & pid) in self . ms . pattern_id_slice ( i) . iter ( ) . enumerate ( )
3134
3134
{
3135
3135
if i > 0 {
3136
3136
write ! ( f, ", " ) ?;
3137
3137
}
3138
- write ! ( f, "{:?}" , pid ) ?;
3138
+ write ! ( f, "{pid :?}" ) ?;
3139
3139
}
3140
3140
writeln ! ( f, "" ) ?;
3141
3141
}
@@ -3525,8 +3525,8 @@ impl TransitionTable<Vec<u32>> {
3525
3525
///
3526
3526
/// Both id1 and id2 must point to valid states, otherwise this panics.
3527
3527
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 :?}" ) ;
3530
3530
// We only need to swap the parts of the state that are used. So if the
3531
3531
// stride is 64, but the alphabet length is only 33, then we save a lot
3532
3532
// of work.
@@ -4277,7 +4277,7 @@ impl<T: AsMut<[u32]>> StartTable<T> {
4277
4277
let len = self
4278
4278
. pattern_len
4279
4279
. expect ( "start states for each pattern enabled" ) ;
4280
- assert ! ( pid < len, "invalid pattern ID {:?}" , pid ) ;
4280
+ assert ! ( pid < len, "invalid pattern ID {pid :?}" ) ;
4281
4281
self . stride
4282
4282
. checked_mul ( pid)
4283
4283
. unwrap ( )
@@ -4868,9 +4868,9 @@ impl<'a> fmt::Debug for State<'a> {
4868
4868
write ! ( f, ", " ) ?;
4869
4869
}
4870
4870
if start == end {
4871
- write ! ( f, "{:?} => {:?}" , start , id ) ?;
4871
+ write ! ( f, "{start :?} => {id :?}" ) ?;
4872
4872
} else {
4873
- write ! ( f, "{:?}-{:?} => {:?}" , start , end , id ) ?;
4873
+ write ! ( f, "{start :?}-{end :?} => {id :?}" ) ?;
4874
4874
}
4875
4875
}
4876
4876
Ok ( ( ) )
@@ -5135,7 +5135,7 @@ impl core::fmt::Display for BuildError {
5135
5135
match self . kind ( ) {
5136
5136
BuildErrorKind :: NFA ( _) => write ! ( f, "error building NFA" ) ,
5137
5137
BuildErrorKind :: Unsupported ( ref msg) => {
5138
- write ! ( f, "unsupported regex feature for DFAs: {}" , msg )
5138
+ write ! ( f, "unsupported regex feature for DFAs: {msg}" )
5139
5139
}
5140
5140
BuildErrorKind :: TooManyStates => write ! (
5141
5141
f,
@@ -5167,11 +5167,10 @@ impl core::fmt::Display for BuildError {
5167
5167
) ,
5168
5168
BuildErrorKind :: DFAExceededSizeLimit { limit } => write ! (
5169
5169
f,
5170
- "DFA exceeded size limit of {:?} during determinization" ,
5171
- limit,
5170
+ "DFA exceeded size limit of {limit:?} during determinization" ,
5172
5171
) ,
5173
5172
BuildErrorKind :: DeterminizeExceededSizeLimit { limit } => {
5174
- write ! ( f, "determinization exceeded size limit of {:?}" , limit )
5173
+ write ! ( f, "determinization exceeded size limit of {limit :?}" )
5175
5174
}
5176
5175
}
5177
5176
}
0 commit comments