@@ -49,11 +49,7 @@ fn validate_path_argument(
49
49
if * path_argument. last ( ) . unwrap ( ) != param_type. split ( "::" ) . last ( ) . unwrap ( )
50
50
&& path_argument_joined != param_type
51
51
{
52
- bail ! (
53
- r#"Invalid argument type, expected "{}", got "{}""# ,
54
- param_type,
55
- path_argument_joined
56
- )
52
+ bail ! ( r#"Invalid argument type, expected "{param_type}", got "{path_argument_joined}""# , )
57
53
}
58
54
Ok ( ( ) )
59
55
}
@@ -236,8 +232,7 @@ impl SupportedCalldataKind for ExprStructCtorCall {
236
232
{
237
233
// TODO add message which arguments are invalid (Issue #2549)
238
234
bail ! (
239
- r"Arguments in constructor invocation for struct {} do not match struct arguments in ABI" ,
240
- expected_type
235
+ r"Arguments in constructor invocation for struct {expected_type} do not match struct arguments in ABI" ,
241
236
)
242
237
}
243
238
@@ -281,11 +276,7 @@ impl SupportedCalldataKind for ExprPath {
281
276
find_enum_variant_position ( enum_variant_name, enum_path, abi) ?;
282
277
283
278
if enum_variant. r#type != "()" {
284
- bail ! (
285
- r#"Couldn't find variant "{}" in enum "{}""# ,
286
- enum_variant_name,
287
- enum_path_joined
288
- )
279
+ bail ! ( r#"Couldn't find variant "{enum_variant_name}" in enum "{enum_path_joined}""# , )
289
280
}
290
281
291
282
Ok ( AllowedCalldataArgument :: Enum ( CalldataEnum :: new (
@@ -337,10 +328,7 @@ impl SupportedCalldataKind for ExprListParenthesized {
337
328
db : & SimpleParserDatabase ,
338
329
) -> Result < AllowedCalldataArgument > {
339
330
let Expr :: Tuple ( tuple) = parse_expression ( expected_type, db) ? else {
340
- bail ! (
341
- r#"Invalid argument type, expected "{}", got tuple"# ,
342
- expected_type
343
- ) ;
331
+ bail ! ( r#"Invalid argument type, expected "{expected_type}", got tuple"# , ) ;
344
332
} ;
345
333
346
334
let tuple_types = tuple
0 commit comments