aboutsummaryrefslogtreecommitdiff
path: root/src/di_container/blocking.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-09-15 23:33:33 +0200
committerHampusM <hampus@hampusmat.com>2024-09-15 23:33:33 +0200
commitd46181de1c19328ff8f3f6a12784cf14c53e9e71 (patch)
tree863bdd4e90ea2d9be66c3164222611cff2aca04a /src/di_container/blocking.rs
parenta34f7c03779aaf90f34b5ff59587daf1db42de8d (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.rs6
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)()))
}
}
}