From 1c46b68581213ca8ae6200daa32f626b5389b4b0 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 25 Aug 2022 20:21:49 +0200 Subject: refactor!: make DI container have single get function BREAKING CHANGE: The DI container get_singleton & get_factory functions have been replaced by the get function now returning a enum --- examples/unbound/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/unbound') diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs index 031a691..e9a8feb 100644 --- a/examples/unbound/main.rs +++ b/examples/unbound/main.rs @@ -19,11 +19,11 @@ fn main() -> Result<(), Box> let di_container = bootstrap()?; - let dog = di_container.get_singleton::()?; + let dog = di_container.get::()?.singleton()?; dog.woof(); - let human = di_container.get::()?; + let human = di_container.get::()?.transient()?; human.make_pets_make_sounds(); -- cgit v1.2.3-18-g5258