aboutsummaryrefslogtreecommitdiff
path: root/examples/generics
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-10-23 18:12:23 +0200
committerHampusM <hampus@hampusmat.com>2022-10-23 18:12:23 +0200
commit9e01cdf341a7866180b3a63d745f3b2d7578d28a (patch)
tree0c036b7b4a68e44b6eb2221bf7beb3c34fe9c1c8 /examples/generics
parent740ef47d49e02ae2f2184f4c347d8eba8aee38fd (diff)
refactor!: reduce DI container coupling
BREAKING CHANGE: You now have to import the DI containers's interfaces to use the DI containers's methods
Diffstat (limited to 'examples/generics')
-rw-r--r--examples/generics/bootstrap.rs3
-rw-r--r--examples/generics/main.rs6
2 files changed, 6 insertions, 3 deletions
diff --git a/examples/generics/bootstrap.rs b/examples/generics/bootstrap.rs
index 98d03db..4034aa8 100644
--- a/examples/generics/bootstrap.rs
+++ b/examples/generics/bootstrap.rs
@@ -1,6 +1,7 @@
use std::rc::Rc;
-use syrette::{di_container_bind, DIContainer};
+use syrette::di_container::blocking::prelude::*;
+use syrette::di_container_bind;
use crate::interfaces::printer::IPrinter;
use crate::printer::Printer;
diff --git a/examples/generics/main.rs b/examples/generics/main.rs
index f491aa0..7910cad 100644
--- a/examples/generics/main.rs
+++ b/examples/generics/main.rs
@@ -4,8 +4,10 @@ mod printer;
use std::error::Error;
-use bootstrap::bootstrap;
-use interfaces::printer::IPrinter;
+use syrette::di_container::blocking::prelude::*;
+
+use crate::bootstrap::bootstrap;
+use crate::interfaces::printer::IPrinter;
fn main() -> Result<(), Box<dyn Error>>
{