diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic/bootstrap.rs | 4 | ||||
-rw-r--r-- | examples/factory/bootstrap.rs | 3 |
2 files changed, 4 insertions, 3 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 } diff --git a/examples/factory/bootstrap.rs b/examples/factory/bootstrap.rs index 1967c6a..a44ccfb 100644 --- a/examples/factory/bootstrap.rs +++ b/examples/factory/bootstrap.rs @@ -18,7 +18,8 @@ pub fn bootstrap() -> DIContainer TransientPtr::new(User::new(name, date_of_birth, password)); user - }); + }) + .unwrap(); di_container } |