From 2a44ec3ffdcd78b23ac31b722b4312774d643c3a Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 24 Sep 2022 16:14:45 +0200 Subject: 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 --- examples/with-3rd-party/bootstrap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/with-3rd-party') 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, Box> di_container .bind::() - .to_default_factory(&|_| TransientPtr::new(Shuriken::new()))?; + .to_default_factory(&|_| Box::new(|| TransientPtr::new(Shuriken::new())))?; Ok(di_container) } -- cgit v1.2.3-18-g5258