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