From 23229e00f608585bf2d623709a4240296721777d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 17 Aug 2022 15:54:31 +0200 Subject: Use `FnOnce` in `Command::perform` ... and revert `FnMut` usage. --- native/src/widget/action.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'native/src/widget') diff --git a/native/src/widget/action.rs b/native/src/widget/action.rs index ea1d9b12..766e902b 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 FnMut(T) -> A + 'static + MaybeSend + Sync, + f: impl Fn(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 mut dyn FnMut(A) -> B, + f: &'a dyn Fn(A) -> B, } impl<'a, A, B> Operation for MapRef<'a, A, B> { -- cgit