From 9e01cdf341a7866180b3a63d745f3b2d7578d28a Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 23 Oct 2022 18:12:23 +0200 Subject: refactor!: reduce DI container coupling BREAKING CHANGE: You now have to import the DI containers's interfaces to use the DI containers's methods --- examples/unbound/bootstrap.rs | 2 +- examples/unbound/main.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'examples/unbound') diff --git a/examples/unbound/bootstrap.rs b/examples/unbound/bootstrap.rs index 04643dc..61e5326 100644 --- a/examples/unbound/bootstrap.rs +++ b/examples/unbound/bootstrap.rs @@ -1,7 +1,7 @@ use std::rc::Rc; use anyhow::Result; -use syrette::DIContainer; +use syrette::di_container::blocking::prelude::*; use crate::animal_store::AnimalStore; use crate::animals::dog::Dog; diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs index f8dddbb..29fa0d4 100644 --- a/examples/unbound/main.rs +++ b/examples/unbound/main.rs @@ -2,16 +2,17 @@ #![deny(clippy::pedantic)] #![allow(clippy::module_name_repetitions)] -use anyhow::Result; - mod animal_store; mod animals; mod bootstrap; mod interfaces; -use bootstrap::bootstrap; -use interfaces::dog::IDog; -use interfaces::human::IHuman; +use anyhow::Result; +use syrette::di_container::blocking::prelude::*; + +use crate::bootstrap::bootstrap; +use crate::interfaces::dog::IDog; +use crate::interfaces::human::IHuman; fn main() -> Result<()> { -- cgit v1.2.3-18-g5258