aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-08-25 20:32:19 +0200
committerHampusM <hampus@hampusmat.com>2022-08-27 14:29:42 +0200
commit626e9e56c23863dce33ef211fa51e49cc5fb48e1 (patch)
treee52f8d16bb14e8b9d1d94e09ade314f56cdd9d30
parent1c46b68581213ca8ae6200daa32f626b5389b4b0 (diff)
docs: update the DI container example
-rw-r--r--src/di_container.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/di_container.rs b/src/di_container.rs
index 1be570b..2cda2bf 100644
--- a/src/di_container.rs
+++ b/src/di_container.rs
@@ -3,9 +3,9 @@
//! # Examples
//! ```
//! use std::collections::HashMap;
+//! use std::error::Error;
//!
//! use syrette::{DIContainer, injectable};
-//! use syrette::errors::di_container::DIContainerError;
//!
//! trait IDatabaseService
//! {
@@ -32,7 +32,7 @@
//! }
//! }
//!
-//! fn main() -> Result<(), String>
+//! fn main() -> Result<(), Box<dyn Error>>
//! {
//! let mut di_container = DIContainer::new();
//!
@@ -42,7 +42,7 @@
//!
//! let database_service = di_container.get::<dyn IDatabaseService>().map_err(|err| {
//! err.to_string()
-//! })?;
+//! })?.transient()?;
//!
//! Ok(())
//! }