aboutsummaryrefslogtreecommitdiff
path: root/examples/async-factory
diff options
context:
space:
mode:
Diffstat (limited to 'examples/async-factory')
-rw-r--r--examples/async-factory/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/async-factory/main.rs b/examples/async-factory/main.rs
index 83f79f0..2b796cc 100644
--- a/examples/async-factory/main.rs
+++ b/examples/async-factory/main.rs
@@ -7,7 +7,7 @@ use std::time::Duration;
use anyhow::Result;
use syrette::future::BoxFuture;
use syrette::ptr::TransientPtr;
-use syrette::{declare_default_factory, factory, AsyncDIContainer};
+use syrette::AsyncDIContainer;
use tokio::time::sleep;
trait IFoo: Send + Sync
@@ -15,7 +15,6 @@ trait IFoo: Send + Sync
fn bar(&self);
}
-#[factory(threadsafe = true)]
type IFooFactory =
dyn Fn(i32) -> BoxFuture<'static, TransientPtr<dyn IFoo>> + Send + Sync;
@@ -68,8 +67,6 @@ impl IPerson for Person
}
}
-declare_default_factory!(dyn IPerson, async = true);
-
#[tokio::main]
async fn main() -> Result<()>
{