From f21d1209aa576a3e597c100fa56afe554dc2babd Mon Sep 17 00:00:00 2001 From: 无限UCW Date: Fri, 12 Aug 2022 01:57:05 +0800 Subject: Relax `Fn` trait bounds in `Command` & `Action` --- native/src/widget/action.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'native/src/widget/action.rs') diff --git a/native/src/widget/action.rs b/native/src/widget/action.rs index 766e902b..ea1d9b12 100644 --- a/native/src/widget/action.rs +++ b/native/src/widget/action.rs @@ -16,7 +16,7 @@ impl Action { /// Maps the output of an [`Action`] using the given function. pub fn map( self, - f: impl Fn(T) -> A + 'static + MaybeSend + Sync, + f: impl FnMut(T) -> A + 'static + MaybeSend + Sync, ) -> Action where T: 'static, @@ -37,7 +37,7 @@ impl Action { #[allow(missing_debug_implementations)] struct Map { operation: Box>, - f: Box B>, + f: Box B>, } impl Operation for Map @@ -52,7 +52,7 @@ where ) { struct MapRef<'a, A, B> { operation: &'a mut dyn Operation, - f: &'a dyn Fn(A) -> B, + f: &'a mut dyn FnMut(A) -> B, } impl<'a, A, B> Operation for MapRef<'a, A, B> { -- cgit