diff options
author | HampusM <hampus@hampusmat.com> | 2024-09-15 23:33:33 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-09-15 23:33:33 +0200 |
commit | d46181de1c19328ff8f3f6a12784cf14c53e9e71 (patch) | |
tree | 863bdd4e90ea2d9be66c3164222611cff2aca04a /src/di_container/blocking.rs | |
parent | a34f7c03779aaf90f34b5ff59587daf1db42de8d (diff) |
refactor!: rename to_*default_factory functions to to_*dynamic_value
BREAKING CHANGE: The functions to_default_factory and
to_async_default_factory have been renamed to to_dynamic_value and
to_async_dynamic_value, respectively
Diffstat (limited to 'src/di_container/blocking.rs')
-rw-r--r-- | src/di_container/blocking.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/di_container/blocking.rs b/src/di_container/blocking.rs index fa3523b..3d79ae7 100644 --- a/src/di_container/blocking.rs +++ b/src/di_container/blocking.rs @@ -311,15 +311,15 @@ impl DIContainer type Func<Interface> = CastableFunction<dyn Fn() -> TransientPtr<Interface>, DIContainer>; - let default_factory = func_bound + let dynamic_val_func = func_bound .as_any() .downcast_ref::<Func<Interface>>() .ok_or_else(|| DIContainerError::CastFailed { interface: type_name::<Interface>(), - binding_kind: "default factory", + binding_kind: "dynamic value function", })?; - Ok(SomePtr::Transient(default_factory.call(self)())) + Ok(SomePtr::Transient(dynamic_val_func.call(self)())) } } } |