aboutsummaryrefslogtreecommitdiff
path: root/examples/unbound/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/unbound/main.rs')
-rw-r--r--examples/unbound/main.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/unbound/main.rs b/examples/unbound/main.rs
index 3a937c3..47629e4 100644
--- a/examples/unbound/main.rs
+++ b/examples/unbound/main.rs
@@ -2,6 +2,9 @@
#![deny(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
+use std::error::Error;
+
+mod animal_store;
mod animals;
mod bootstrap;
mod interfaces;
@@ -10,7 +13,7 @@ use bootstrap::bootstrap;
use interfaces::dog::IDog;
use interfaces::human::IHuman;
-fn main()
+fn main() -> Result<(), Box<dyn Error>>
{
println!("Hello, world!");
@@ -20,7 +23,9 @@ fn main()
dog.woof();
- let human = di_container.get::<dyn IHuman>().unwrap();
+ let human = di_container.get::<dyn IHuman>()?;
human.make_pets_make_sounds();
+
+ Ok(())
}