diff options
author | HampusM <hampus@hampusmat.com> | 2022-09-02 18:45:30 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-09-02 18:45:30 +0200 |
commit | 40109b5298160795cedca4c8204c8a1dd0bcd0be (patch) | |
tree | 083dc34f2824087bda7015b1d9e4eaa5b9445ac3 /macros/src/injectable_macro_args.rs | |
parent | 14a91d97c5e2f3184f2b91003ab8e2bc5a92b312 (diff) |
refactor!: remove braces from expected injectable macro input
BREAKING CHANGE: The injectable macro no longer expects braces around it's flags
Diffstat (limited to 'macros/src/injectable_macro_args.rs')
-rw-r--r-- | macros/src/injectable_macro_args.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/macros/src/injectable_macro_args.rs b/macros/src/injectable_macro_args.rs index 6cc1d7e..50d4087 100644 --- a/macros/src/injectable_macro_args.rs +++ b/macros/src/injectable_macro_args.rs @@ -1,6 +1,6 @@ use syn::parse::{Parse, ParseStream}; use syn::punctuated::Punctuated; -use syn::{braced, Token, TypePath}; +use syn::{Token, TypePath}; use crate::macro_flag::MacroFlag; use crate::util::iterator_ext::IteratorExt; @@ -39,11 +39,7 @@ impl Parse for InjectableMacroArgs }); } - let braced_content; - - braced!(braced_content in input); - - let flags = braced_content.parse_terminated(MacroFlag::parse)?; + let flags = Punctuated::<MacroFlag, Token![,]>::parse_terminated(input)?; for flag in &flags { let flag_str = flag.flag.to_string(); |