diff options
author | HampusM <hampus@hampusmat.com> | 2022-11-06 19:21:41 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-11-06 19:21:41 +0100 |
commit | 6e764480ee150146afa9d629777433f8239fa1ba (patch) | |
tree | 5b11364c7d97eb1e78b0c3f4ba4bd7145bdd9fec /src/di_container/blocking | |
parent | 56349a530811bbf0657fed14912c7e02001b2c8a (diff) |
refactor: fix unused self clippy lint in blocking DI container
Diffstat (limited to 'src/di_container/blocking')
-rw-r--r-- | src/di_container/blocking/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/di_container/blocking/mod.rs b/src/di_container/blocking/mod.rs index a54912b..97cca59 100644 --- a/src/di_container/blocking/mod.rs +++ b/src/di_container/blocking/mod.rs @@ -175,7 +175,11 @@ impl IDIContainer<DependencyHistory> for DIContainer let binding_providable = self.get_binding_providable::<Interface>(name, dependency_history)?; - self.handle_binding_providable(binding_providable) + #[cfg(feature = "factory")] + return self.handle_binding_providable(binding_providable); + + #[cfg(not(feature = "factory"))] + Self::handle_binding_providable(binding_providable) } } @@ -214,7 +218,7 @@ impl details::DIContainerInternals<DependencyHistory> for DIContainer impl DIContainer { fn handle_binding_providable<Interface>( - self: &Rc<Self>, + #[cfg(feature = "factory")] self: &Rc<Self>, binding_providable: Providable<Self, DependencyHistory>, ) -> Result<SomePtr<Interface>, DIContainerError> where |