diff options
-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 |