aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/async-factory/main.rs2
-rw-r--r--examples/async/bootstrap.rs2
-rw-r--r--examples/with-3rd-party/bootstrap.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/async-factory/main.rs b/examples/async-factory/main.rs
index 2b796cc..795e50c 100644
--- a/examples/async-factory/main.rs
+++ b/examples/async-factory/main.rs
@@ -84,7 +84,7 @@ async fn main() -> Result<()>
di_container
.bind::<dyn IPerson>()
- .to_async_default_factory(&|_| {
+ .to_async_dynamic_value(&|_| {
Box::new(|| {
Box::pin(async {
// Do some time demanding thing...
diff --git a/examples/async/bootstrap.rs b/examples/async/bootstrap.rs
index 07e1bf8..5abeac7 100644
--- a/examples/async/bootstrap.rs
+++ b/examples/async/bootstrap.rs
@@ -20,7 +20,7 @@ pub async fn bootstrap() -> Result<AsyncDIContainer, anyhow::Error>
.in_singleton_scope()
.await?;
- di_container.bind::<dyn ICat>().to_default_factory(&|_| {
+ di_container.bind::<dyn ICat>().to_dynamic_value(&|_| {
Box::new(|| {
let cat: TransientPtr<dyn ICat> = TransientPtr::new(Cat::new());
diff --git a/examples/with-3rd-party/bootstrap.rs b/examples/with-3rd-party/bootstrap.rs
index 26386f5..5d2f713 100644
--- a/examples/with-3rd-party/bootstrap.rs
+++ b/examples/with-3rd-party/bootstrap.rs
@@ -15,7 +15,7 @@ pub fn bootstrap() -> Result<DIContainer, Box<dyn Error>>
di_container
.bind::<Shuriken>()
- .to_default_factory(&|_| Box::new(|| TransientPtr::new(Shuriken::new())))?;
+ .to_dynamic_value(&|_| Box::new(|| TransientPtr::new(Shuriken::new())))?;
Ok(di_container)
}