From 846720a4168fcd6de54a4c59152bac785c866a18 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 2 Oct 2022 20:03:49 +0200 Subject: refactor: clarify binding builder to_factory signature --- src/di_container.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/di_container.rs b/src/di_container.rs index 4d43e8a..068a798 100644 --- a/src/di_container.rs +++ b/src/di_container.rs @@ -334,17 +334,15 @@ where /// # } /// ``` #[feature_specific("factory")] - pub fn to_factory( + pub fn to_factory( &self, - factory_func: &'static dyn Fn< - (std::rc::Rc,), - Output = Box>>, - >, + factory_func: &'static Func, ) -> Result, BindingBuilderError> where Args: 'static, Return: 'static + ?Sized, Interface: Fn>, + Func: Fn<(std::rc::Rc,), Output = Box>, { { let bindings = self.di_container.bindings.borrow(); -- cgit v1.2.3-18-g5258