aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-09-24 17:31:16 +0200
committerHampusM <hampus@hampusmat.com>2022-09-24 17:33:10 +0200
commitfdd7f824fd1244226ca86f525f8439744676688f (patch)
tree073019e506e36578caeab894835ccf51dc5d7584 /src/lib.rs
parentfebfb927b27ab03041500b16c65bdbc0624a5a72 (diff)
feat: add bind async default factories to async DI container
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 247f907..082a93d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -125,4 +125,9 @@ macro_rules! async_closure {
Box::pin(async move { $($inner)* })
})
};
+ (|| { $($inner: stmt);* }) => {
+ Box::new(|| {
+ Box::pin(async move { $($inner)* })
+ })
+ };
}