diff options
-rw-r--r-- | macros/src/factory/declare_default_args.rs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/macros/src/factory/declare_default_args.rs b/macros/src/factory/declare_default_args.rs index 46185e3..269ef8f 100644 --- a/macros/src/factory/declare_default_args.rs +++ b/macros/src/factory/declare_default_args.rs @@ -202,27 +202,26 @@ mod tests dyn IBar, async = true, foo = false }; - assert!(matches!( - parse2::<DeclareDefaultFactoryMacroArgs>(input_args), - Err(_) - )); + assert!(parse2::<DeclareDefaultFactoryMacroArgs>(input_args).is_err()); } #[test] fn cannot_parse_with_interface_and_duplicate_flag() { - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareDefaultFactoryMacroArgs>(quote! { dyn IBar, async = true, threadsafe = false, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareDefaultFactoryMacroArgs>(quote! { dyn IBar, async = true, threadsafe = false, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } |