aboutsummaryrefslogtreecommitdiff
path: root/examples/with-3rd-party
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-09-24 16:14:45 +0200
committerHampusM <hampus@hampusmat.com>2022-09-24 16:14:45 +0200
commit2a44ec3ffdcd78b23ac31b722b4312774d643c3a (patch)
treed3056a1fffe6311f863c4d683cc3444507c3e7d8 /examples/with-3rd-party
parent695f90bf900015df1e2728445f833dabced838a9 (diff)
refactor!: remove repetition of declaring factory interfaces
BREAKING CHANGE: The to_default_factory method of the blocking and async DI containers now expect a function returning another function
Diffstat (limited to 'examples/with-3rd-party')
-rw-r--r--examples/with-3rd-party/bootstrap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/with-3rd-party/bootstrap.rs b/examples/with-3rd-party/bootstrap.rs
index c5512c4..4fea754 100644
--- a/examples/with-3rd-party/bootstrap.rs
+++ b/examples/with-3rd-party/bootstrap.rs
@@ -18,7 +18,7 @@ pub fn bootstrap() -> Result<Rc<DIContainer>, Box<dyn Error>>
di_container
.bind::<Shuriken>()
- .to_default_factory(&|_| TransientPtr::new(Shuriken::new()))?;
+ .to_default_factory(&|_| Box::new(|| TransientPtr::new(Shuriken::new())))?;
Ok(di_container)
}