diff options
| author | HampusM <hampus@hampusmat.com> | 2023-08-04 17:38:00 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2023-08-04 17:38:00 +0200 |
| commit | b4ddc1e626fbd11d784b442d246ddc5f54c35b51 (patch) | |
| tree | b8f87926310b8490fce701d17dcd0a612067034d /macros/src/declare_interface_args.rs | |
| parent | e0216c7cbf008f2867ef92955abce28dba27f5e3 (diff) | |
refactor!: rename the async flag of the declare_interface macro
BREAKING CHANGE: The flag 'async' of the declare_interface macro has been renamed to 'threadsafe_sharable'. The reason being that the name 'async' was an outright lie. The new name describes exactly what the flag enables
Diffstat (limited to 'macros/src/declare_interface_args.rs')
| -rw-r--r-- | macros/src/declare_interface_args.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/macros/src/declare_interface_args.rs b/macros/src/declare_interface_args.rs index 79004da..fea6c7b 100644 --- a/macros/src/declare_interface_args.rs +++ b/macros/src/declare_interface_args.rs @@ -5,7 +5,7 @@ use syn::{Token, TypePath}; use crate::macro_flag::MacroFlag; use crate::util::iterator_ext::IteratorExt; -pub const DECLARE_INTERFACE_FLAGS: &[&str] = &["async"]; +pub const DECLARE_INTERFACE_FLAGS: &[&str] = &["threadsafe_sharable"]; pub struct DeclareInterfaceArgs { @@ -110,7 +110,7 @@ mod tests fn can_parse_with_flags() -> Result<(), Box<dyn Error>> { let input_args = quote! { - Foobar -> IFoobar, async = true + Foobar -> IFoobar, threadsafe_sharable = true }; let decl_interface_args = parse2::<DeclareInterfaceArgs>(input_args)?; @@ -140,7 +140,7 @@ mod tests assert_eq!( decl_interface_args.flags, Punctuated::from_iter(vec