aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/bootstrap.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-08-03 14:13:55 +0200
committerHampusM <hampus@hampusmat.com>2022-08-21 18:17:17 +0200
commitb54dee1fb52f259de8b485d050d75c6956750b7f (patch)
treec2aa02de55da6c2d4c338982afee18ce42465160 /examples/basic/bootstrap.rs
parentc33cf02c9a6fffc6149fd7b59c63ad0d15d61432 (diff)
feat!: prevent binding the same interface more than once
BREAKING CHANGE: The 'to' and 'to_factory' methods of BindingBuilder now return 'Result'
Diffstat (limited to 'examples/basic/bootstrap.rs')
-rw-r--r--examples/basic/bootstrap.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/basic/bootstrap.rs b/examples/basic/bootstrap.rs
index 10a7041..4af2d82 100644
--- a/examples/basic/bootstrap.rs
+++ b/examples/basic/bootstrap.rs
@@ -18,8 +18,8 @@ pub fn bootstrap() -> DIContainer
.bind::<dyn IDog>()
.to_singleton::<Dog>()
.unwrap();
- di_container.bind::<dyn ICat>().to::<Cat>();
- di_container.bind::<dyn IHuman>().to::<Human>();
+ di_container.bind::<dyn ICat>().to::<Cat>().unwrap();
+ di_container.bind::<dyn IHuman>().to::<Human>().unwrap();
di_container
}