diff options
author | HampusM <hampus@hampusmat.com> | 2023-08-16 18:32:20 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-08-16 18:36:34 +0200 |
commit | cc48563f774423fe591911fed413cf3db4ba326e (patch) | |
tree | 81fcd79ca6bc52a2d7bee2d6f56dde198422f8a6 /macros/src/lib.rs | |
parent | 096c27c0e5cc3b0f4dbf7dbf7f335acf705b9b6a (diff) |
chore!: remove the factory macro async flag
BREAKING CHANGE: The factory macro's async flag has been removed
Diffstat (limited to 'macros/src/lib.rs')
-rw-r--r-- | macros/src/lib.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index b11186e..e9aaeb0 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -253,7 +253,6 @@ pub fn injectable(args_stream: TokenStream, input_stream: TokenStream) -> TokenS /// /// # Flags /// - `threadsafe` - Mark as threadsafe. -/// - `async` - Mark as async. Infers the `threadsafe` flag. /// /// # Examples /// ``` @@ -294,22 +293,12 @@ pub fn factory(args_stream: TokenStream, input_stream: TokenStream) -> TokenStre let FactoryMacroArgs { flags } = parse(args_stream).unwrap_or_abort(); - let mut is_threadsafe = flags + let is_threadsafe = flags .iter() .find(|flag| flag.name() == "threadsafe") .map_or(Ok(false), MacroFlag::get_bool) .unwrap_or_abort(); - let is_async = flags - .iter() - .find(|flag| flag.name() == "async") - .map_or(Ok(false), MacroFlag::get_bool) - .unwrap_or_abort(); - - if is_async { - is_threadsafe = true; - } - let FactoryTypeAlias { type_alias, factory_interface, |