aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-09-18 22:35:58 +0200
committerHampusM <hampus@hampusmat.com>2023-09-18 22:35:58 +0200
commit4fd0d6b4951b08a20d5378bca75561109dc6d036 (patch)
tree8496d679e7ee3debcd415ed563911e2166594212 /examples
parentde2e1349f459f7f69226b2decd366be690426ea7 (diff)
refactor!: make the async DI container not inside a Arc
BREAKING CHANGE: The async DI container is no longer inside of a Arc. This affects AsyncBindingBuilder, AsyncBindingScopeConfigurator, AsyncBindingWhenConfigurator & AsyncInjectable
Diffstat (limited to 'examples')
-rw-r--r--examples/async/bootstrap.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/async/bootstrap.rs b/examples/async/bootstrap.rs
index 9b495c2..d26876a 100644
--- a/examples/async/bootstrap.rs
+++ b/examples/async/bootstrap.rs
@@ -1,6 +1,3 @@
-use std::sync::Arc;
-
-use anyhow::Result;
use syrette::ptr::TransientPtr;
use syrette::{declare_default_factory, AsyncDIContainer};
@@ -15,7 +12,7 @@ use crate::interfaces::human::IHuman;
declare_default_factory!(dyn ICat, threadsafe = true);
-pub async fn bootstrap() -> Result<Arc<AsyncDIContainer>>
+pub async fn bootstrap() -> Result<AsyncDIContainer, anyhow::Error>
{
let mut di_container = AsyncDIContainer::new();