diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/di_container.rs | 6 |
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(()) //! } |