@@ -136,15 +136,12 @@ mod tests {
136136 if let Some ( exp_method) = expected_method {
137137 assert ! (
138138 route_args. method. is_some( ) ,
139- "Expected method {} but got None for input: {}" ,
140- exp_method,
141- input
139+ "Expected method {exp_method} but got None for input: {input}"
142140 ) ;
143141 assert_eq ! (
144142 route_args. method. as_ref( ) . unwrap( ) . to_string( ) ,
145143 exp_method,
146- "Method mismatch for input: {}" ,
147- input
144+ "Method mismatch for input: {input}"
148145 ) ;
149146 } else {
150147 assert ! (
@@ -159,15 +156,12 @@ mod tests {
159156 if let Some ( exp_path) = expected_path {
160157 assert ! (
161158 route_args. path. is_some( ) ,
162- "Expected path {} but got None for input: {}" ,
163- exp_path,
164- input
159+ "Expected path {exp_path} but got None for input: {input}"
165160 ) ;
166161 assert_eq ! (
167162 route_args. path. as_ref( ) . unwrap( ) . value( ) ,
168163 exp_path,
169- "Path mismatch for input: {}" ,
170- input
164+ "Path mismatch for input: {input}"
171165 ) ;
172166 } else {
173167 assert ! (
@@ -182,9 +176,7 @@ mod tests {
182176 if let Some ( exp_status) = expected_error_status {
183177 assert ! (
184178 route_args. error_status. is_some( ) ,
185- "Expected error_status {:?} but got None for input: {}" ,
186- exp_status,
187- input
179+ "Expected error_status {exp_status:?} but got None for input: {input}"
188180 ) ;
189181 let array = route_args. error_status . as_ref ( ) . unwrap ( ) ;
190182 let mut status_codes = Vec :: new ( ) ;
@@ -200,8 +192,7 @@ mod tests {
200192 }
201193 assert_eq ! (
202194 status_codes, exp_status,
203- "Error status mismatch for input: {}" ,
204- input
195+ "Error status mismatch for input: {input}"
205196 ) ;
206197 } else {
207198 assert ! (
@@ -216,13 +207,10 @@ mod tests {
216207 // Expected error, test passes
217208 }
218209 ( true , Err ( e) ) => {
219- panic ! (
220- "Expected successful parse but got error: {} for input: {}" ,
221- e, input
222- ) ;
210+ panic ! ( "Expected successful parse but got error: {e} for input: {input}" ) ;
223211 }
224212 ( false , Ok ( _) ) => {
225- panic ! ( "Expected parse error but got success for input: {}" , input ) ;
213+ panic ! ( "Expected parse error but got success for input: {input}" ) ;
226214 }
227215 }
228216 }
@@ -258,8 +246,7 @@ mod tests {
258246 } else {
259247 assert ! (
260248 route_args. tags. is_some( ) ,
261- "Expected tags but got None for input: {}" ,
262- input
249+ "Expected tags but got None for input: {input}"
263250 ) ;
264251 let tags_array = route_args. tags . as_ref ( ) . unwrap ( ) ;
265252 let mut parsed_tags = Vec :: new ( ) ;
@@ -274,22 +261,18 @@ mod tests {
274261 }
275262 assert_eq ! (
276263 parsed_tags, expected_tags,
277- "Tags mismatch for input: {}" ,
278- input
264+ "Tags mismatch for input: {input}"
279265 ) ;
280266 }
281267 }
282268 ( false , Err ( _) ) => {
283269 // Expected error, test passes
284270 }
285271 ( true , Err ( e) ) => {
286- panic ! (
287- "Expected successful parse but got error: {} for input: {}" ,
288- e, input
289- ) ;
272+ panic ! ( "Expected successful parse but got error: {e} for input: {input}" ) ;
290273 }
291274 ( false , Ok ( _) ) => {
292- panic ! ( "Expected parse error but got success for input: {}" , input ) ;
275+ panic ! ( "Expected parse error but got success for input: {input}" ) ;
293276 }
294277 }
295278 }
0 commit comments