diff options
author | HampusM <hampus@hampusmat.com> | 2022-08-22 19:13:19 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-08-22 19:13:19 +0200 |
commit | 8e862c7998d0b59c71d20cbcbbc57031f734b6fa (patch) | |
tree | fbcddcfa697d0b67c9d20022004aa2ae16c5a339 /examples/unbound/main.rs | |
parent | da3f56d48f9c349b29e1d462b2a535b1a89c5e45 (diff) |
refactor!: move specifying binding scope to a binding scope configurator
BREAKING CHANGE: Specifying the scope of a DI container binding is now done with a binding scope configurator
Diffstat (limited to 'examples/unbound/main.rs')
-rw-r--r-- | examples/unbound/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs index 47629e4..031a691 100644 --- a/examples/unbound/main.rs +++ b/examples/unbound/main.rs @@ -17,9 +17,9 @@ fn main() -> Result<(), Box<dyn Error>> { println!("Hello, world!"); - let di_container = bootstrap(); + let di_container = bootstrap()?; - let dog = di_container.get_singleton::<dyn IDog>().unwrap(); + let dog = di_container.get_singleton::<dyn IDog>()?; dog.woof(); |