aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/bootstrap.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-07-22 13:25:45 +0200
committerHampusM <hampus@hampusmat.com>2022-07-22 13:25:45 +0200
commit4cb3884e24b3cba3347ff93475bbabd6fe18d2fa (patch)
tree2fa5e6d81de9dc39bd11d64797914e5d305d98e2 /examples/basic/bootstrap.rs
parent157f38bc2287dcb9a8b21ef3d5e33c569dc5136e (diff)
refactor: make factories an optional feature
Diffstat (limited to 'examples/basic/bootstrap.rs')
-rw-r--r--examples/basic/bootstrap.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/examples/basic/bootstrap.rs b/examples/basic/bootstrap.rs
index a1a7b05..71ef713 100644
--- a/examples/basic/bootstrap.rs
+++ b/examples/basic/bootstrap.rs
@@ -2,13 +2,11 @@ use syrette::DIContainer;
// Concrete implementations
use crate::animals::cat::Cat;
-use crate::animals::cow::Cow;
use crate::animals::dog::Dog;
use crate::animals::human::Human;
//
// Interfaces
use crate::interfaces::cat::ICat;
-use crate::interfaces::cow::{CowFactory, ICow};
use crate::interfaces::dog::IDog;
use crate::interfaces::human::IHuman;
@@ -20,10 +18,5 @@ pub fn bootstrap() -> DIContainer
di_container.bind::<dyn ICat>().to::<Cat>();
di_container.bind::<dyn IHuman>().to::<Human>();
- di_container.bind::<CowFactory>().to_factory(&|moo_cnt| {
- let cow: Box<dyn ICow> = Box::new(Cow::new(moo_cnt));
- cow
- });
-
di_container
}