aboutsummaryrefslogtreecommitdiff
path: root/src/di_container.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/di_container.rs')
-rw-r--r--src/di_container.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/di_container.rs b/src/di_container.rs
index 239a2cb..eaa0366 100644
--- a/src/di_container.rs
+++ b/src/di_container.rs
@@ -32,13 +32,17 @@
//! }
//! }
//!
-//! fn main() -> error_stack::Result<(), DIContainerError>
+//! fn main() -> Result<(), String>
//! {
//! let mut di_container = DIContainer::new();
//!
-//! di_container.bind::<dyn IDatabaseService>().to::<DatabaseService>();
+//! di_container.bind::<dyn IDatabaseService>().to::<DatabaseService>().map_err(|err| {
+//! err.to_string()
+//! })?;
//!
-//! let database_service = di_container.get::<dyn IDatabaseService>()?;
+//! let database_service = di_container.get::<dyn IDatabaseService>().map_err(|err| {
+//! err.to_string()
+//! })?;
//!
//! Ok(())
//! }