diff options
| -rw-r--r-- | macros/src/factory/macro_args.rs | 20 | 
1 files changed, 11 insertions, 9 deletions
| diff --git a/macros/src/factory/macro_args.rs b/macros/src/factory/macro_args.rs index 64d6e12..8acbdb6 100644 --- a/macros/src/factory/macro_args.rs +++ b/macros/src/factory/macro_args.rs @@ -107,24 +107,26 @@ mod tests              async = true, threadsafe = false, foo = true          }; -        assert!(matches!(parse2::<FactoryMacroArgs>(input_args), Err(_))); +        assert!(parse2::<FactoryMacroArgs>(input_args).is_err());      }      #[test]      fn cannot_parse_with_duplicate_flag()      { -        assert!(matches!( +        assert!( +            // Formatting is weird without this comment              parse2::<FactoryMacroArgs>(quote! {                  async = true, threadsafe = false, async = true -            }), -            Err(_) -        )); +            }) +            .is_err() +        ); -        assert!(matches!( +        assert!( +            // Formatting is weird without this comment              parse2::<FactoryMacroArgs>(quote! {                  async = true, threadsafe = false, async = false -            }), -            Err(_) -        )); +            }) +            .is_err() +        );      }  } | 
