From 626e9e56c23863dce33ef211fa51e49cc5fb48e1 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 25 Aug 2022 20:32:19 +0200 Subject: docs: update the DI container example --- src/di_container.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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> //! { //! let mut di_container = DIContainer::new(); //! @@ -42,7 +42,7 @@ //! //! let database_service = di_container.get::().map_err(|err| { //! err.to_string() -//! })?; +//! })?.transient()?; //! //! Ok(()) //! } -- cgit v1.2.3-18-g5258