aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/async_injectable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/async_injectable.rs')
-rw-r--r--src/interfaces/async_injectable.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/interfaces/async_injectable.rs b/src/interfaces/async_injectable.rs
index c455970..4c18487 100644
--- a/src/interfaces/async_injectable.rs
+++ b/src/interfaces/async_injectable.rs
@@ -1,6 +1,5 @@
//! Interface for structs that can be injected into or be injected to.
use std::fmt::Debug;
-use std::sync::Arc;
use crate::errors::injectable::InjectableError;
use crate::future::BoxFuture;
@@ -11,14 +10,14 @@ use crate::util::use_double;
use_double!(crate::dependency_history::DependencyHistory);
/// Interface for structs that can be injected into or be injected to.
-pub trait AsyncInjectable<DIContainerType>: CastFromArc
+pub trait AsyncInjectable<DIContainerT>: CastFromArc
{
/// Resolves the dependencies of the injectable.
///
/// # Errors
/// Will return `Err` if resolving the dependencies fails.
fn resolve<'di_container, 'fut>(
- di_container: &'di_container Arc<DIContainerType>,
+ di_container: &'di_container DIContainerT,
dependency_history: DependencyHistory,
) -> BoxFuture<'fut, Result<TransientPtr<Self>, InjectableError>>
where
@@ -26,7 +25,7 @@ pub trait AsyncInjectable<DIContainerType>: CastFromArc
'di_container: 'fut;
}
-impl<DIContainerType> Debug for dyn AsyncInjectable<DIContainerType>
+impl<DIContainerT> Debug for dyn AsyncInjectable<DIContainerT>
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
{