@@ -2824,8 +2824,7 @@ impl OwnedDFA {
2824
2824
}
2825
2825
assert ! (
2826
2826
!matches. contains_key( & start_id) ,
2827
- "{:?} is both a start and a match state, which is not allowed" ,
2828
- start_id,
2827
+ "{start_id:?} is both a start and a match state, which is not allowed" ,
2829
2828
) ;
2830
2829
is_start. insert ( start_id) ;
2831
2830
}
@@ -3085,7 +3084,7 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3085
3084
} else {
3086
3085
self . to_index ( state. id ( ) )
3087
3086
} ;
3088
- write ! ( f, "{:06?}: " , id ) ?;
3087
+ write ! ( f, "{id :06?}: " ) ?;
3089
3088
state. fmt ( f) ?;
3090
3089
write ! ( f, "\n " ) ?;
3091
3090
}
@@ -3101,11 +3100,11 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3101
3100
Anchored :: No => writeln ! ( f, "START-GROUP(unanchored)" ) ?,
3102
3101
Anchored :: Yes => writeln ! ( f, "START-GROUP(anchored)" ) ?,
3103
3102
Anchored :: Pattern ( pid) => {
3104
- writeln ! ( f, "START_GROUP(pattern: {:?})" , pid ) ?
3103
+ writeln ! ( f, "START_GROUP(pattern: {pid :?})" ) ?
3105
3104
}
3106
3105
}
3107
3106
}
3108
- writeln ! ( f, " {:?} => {:06?}" , sty , id ) ?;
3107
+ writeln ! ( f, " {sty :?} => {id :06?}" ) ?;
3109
3108
}
3110
3109
if self . pattern_len ( ) > 1 {
3111
3110
writeln ! ( f, "" ) ?;
@@ -3116,13 +3115,13 @@ impl<T: AsRef<[u32]>> fmt::Debug for DFA<T> {
3116
3115
} else {
3117
3116
self . to_index ( id)
3118
3117
} ;
3119
- write ! ( f, "MATCH({:06?}): " , id ) ?;
3118
+ write ! ( f, "MATCH({id :06?}): " ) ?;
3120
3119
for ( i, & pid) in self . ms . pattern_id_slice ( i) . iter ( ) . enumerate ( )
3121
3120
{
3122
3121
if i > 0 {
3123
3122
write ! ( f, ", " ) ?;
3124
3123
}
3125
- write ! ( f, "{:?}" , pid ) ?;
3124
+ write ! ( f, "{pid :?}" ) ?;
3126
3125
}
3127
3126
writeln ! ( f, "" ) ?;
3128
3127
}
@@ -3512,8 +3511,8 @@ impl TransitionTable<Vec<u32>> {
3512
3511
///
3513
3512
/// Both id1 and id2 must point to valid states, otherwise this panics.
3514
3513
fn swap ( & mut self , id1 : StateID , id2 : StateID ) {
3515
- assert ! ( self . is_valid( id1) , "invalid 'id1' state: {:?}" , id1 ) ;
3516
- assert ! ( self . is_valid( id2) , "invalid 'id2' state: {:?}" , id2 ) ;
3514
+ assert ! ( self . is_valid( id1) , "invalid 'id1' state: {id1 :?}" ) ;
3515
+ assert ! ( self . is_valid( id2) , "invalid 'id2' state: {id2 :?}" ) ;
3517
3516
// We only need to swap the parts of the state that are used. So if the
3518
3517
// stride is 64, but the alphabet length is only 33, then we save a lot
3519
3518
// of work.
@@ -4258,7 +4257,7 @@ impl<T: AsMut<[u32]>> StartTable<T> {
4258
4257
let len = self
4259
4258
. pattern_len
4260
4259
. expect ( "start states for each pattern enabled" ) ;
4261
- assert ! ( pid < len, "invalid pattern ID {:?}" , pid ) ;
4260
+ assert ! ( pid < len, "invalid pattern ID {pid :?}" ) ;
4262
4261
self . stride
4263
4262
. checked_mul ( pid)
4264
4263
. unwrap ( )
@@ -4849,9 +4848,9 @@ impl<'a> fmt::Debug for State<'a> {
4849
4848
write ! ( f, ", " ) ?;
4850
4849
}
4851
4850
if start == end {
4852
- write ! ( f, "{:?} => {:?}" , start , id ) ?;
4851
+ write ! ( f, "{start :?} => {id :?}" ) ?;
4853
4852
} else {
4854
- write ! ( f, "{:?}-{:?} => {:?}" , start , end , id ) ?;
4853
+ write ! ( f, "{start :?}-{end :?} => {id :?}" ) ?;
4855
4854
}
4856
4855
}
4857
4856
Ok ( ( ) )
@@ -5048,7 +5047,7 @@ impl core::fmt::Display for BuildError {
5048
5047
match self . kind ( ) {
5049
5048
BuildErrorKind :: NFA ( _) => write ! ( f, "error building NFA" ) ,
5050
5049
BuildErrorKind :: Unsupported ( ref msg) => {
5051
- write ! ( f, "unsupported regex feature for DFAs: {}" , msg )
5050
+ write ! ( f, "unsupported regex feature for DFAs: {msg}" )
5052
5051
}
5053
5052
BuildErrorKind :: TooManyStates => write ! (
5054
5053
f,
@@ -5080,11 +5079,10 @@ impl core::fmt::Display for BuildError {
5080
5079
) ,
5081
5080
BuildErrorKind :: DFAExceededSizeLimit { limit } => write ! (
5082
5081
f,
5083
- "DFA exceeded size limit of {:?} during determinization" ,
5084
- limit,
5082
+ "DFA exceeded size limit of {limit:?} during determinization" ,
5085
5083
) ,
5086
5084
BuildErrorKind :: DeterminizeExceededSizeLimit { limit } => {
5087
- write ! ( f, "determinization exceeded size limit of {:?}" , limit )
5085
+ write ! ( f, "determinization exceeded size limit of {limit :?}" )
5088
5086
}
5089
5087
}
5090
5088
}
0 commit comments