aboutsummaryrefslogtreecommitdiff
path: root/src/di_container/blocking/binding
diff options
context:
space:
mode:
Diffstat (limited to 'src/di_container/blocking/binding')
-rw-r--r--src/di_container/blocking/binding/builder.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/di_container/blocking/binding/builder.rs b/src/di_container/blocking/binding/builder.rs
index 577f034..bfc9e4e 100644
--- a/src/di_container/blocking/binding/builder.rs
+++ b/src/di_container/blocking/binding/builder.rs
@@ -99,16 +99,13 @@ where
where
Implementation: Injectable<DIContainerType>,
{
+ if self
+ .di_container
+ .has_binding::<Interface>(BindingOptions::new())
{
- if self
- .di_container
- .has_binding::<Interface>(BindingOptions::new())
- {
- return Err(BindingBuilderError::BindingAlreadyExists(type_name::<
- Interface,
- >(
- )));
- }
+ return Err(BindingBuilderError::BindingAlreadyExists(type_name::<
+ Interface,
+ >()));
}
let binding_scope_configurator = BindingScopeConfigurator::new(