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/system/action.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'native/src/system/action.rs') diff --git a/native/src/system/action.rs b/native/src/system/action.rs index 7f66141b..dea9536f 100644 --- a/native/src/system/action.rs +++ b/native/src/system/action.rs @@ -9,15 +9,15 @@ pub enum Action { QueryInformation(Box>), } -pub trait Closure: FnOnce(system::Information) -> T + MaybeSend {} +pub trait Closure: Fn(system::Information) -> T + MaybeSend {} -impl Closure for T where T: FnOnce(system::Information) -> O + MaybeSend {} +impl Closure for T where T: Fn(system::Information) -> O + MaybeSend {} impl Action { /// Maps the output of a system [`Action`] using the provided closure. pub fn map( self, - f: impl FnOnce(T) -> A + 'static + MaybeSend + Sync, + f: impl Fn(T) -> A + 'static + MaybeSend + Sync, ) -> Action where T: 'static, -- cgit