aboutsummaryrefslogtreecommitdiff
path: root/examples/basic/bootstrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basic/bootstrap.rs')
-rw-r--r--examples/basic/bootstrap.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/basic/bootstrap.rs b/examples/basic/bootstrap.rs
index 4e02dc3..30f6df3 100644
--- a/examples/basic/bootstrap.rs
+++ b/examples/basic/bootstrap.rs
@@ -1,4 +1,5 @@
use std::error::Error;
+use std::rc::Rc;
use syrette::DIContainer;
@@ -12,9 +13,9 @@ use crate::interfaces::cat::ICat;
use crate::interfaces::dog::IDog;
use crate::interfaces::human::IHuman;
-pub fn bootstrap() -> Result<DIContainer, Box<dyn Error>>
+pub fn bootstrap() -> Result<Rc<DIContainer>, Box<dyn Error>>
{
- let mut di_container: DIContainer = DIContainer::new();
+ let mut di_container = DIContainer::new();
di_container
.bind::<dyn IDog>()