From 8651f84f205da7a89f2fc7333d1dd8de0d80a22b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 17 Sep 2022 16:12:45 +0200 Subject: refactor!: make async DI container be used inside of a Arc BREAKING CHANGE: The async DI container is to be used inside of a Arc & it also no longer implements Default --- src/interfaces/async_injectable.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/interfaces') diff --git a/src/interfaces/async_injectable.rs b/src/interfaces/async_injectable.rs index badc3c5..fb5452b 100644 --- a/src/interfaces/async_injectable.rs +++ b/src/interfaces/async_injectable.rs @@ -2,6 +2,7 @@ //! //! *This module is only available if Syrette is built with the "async" feature.* use std::fmt::Debug; +use std::sync::Arc; use async_trait::async_trait; @@ -19,7 +20,7 @@ pub trait AsyncInjectable: CastFromSync /// # Errors /// Will return `Err` if resolving the dependencies fails. async fn resolve( - di_container: &AsyncDIContainer, + di_container: &Arc, dependency_history: Vec<&'static str>, ) -> Result, InjectableError> where -- cgit v1.2.3-18-g5258