diff options
Diffstat (limited to '')
-rw-r--r-- | native/src/command.rs | 4 | ||||
-rw-r--r-- | native/src/command/action.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/native/src/command.rs b/native/src/command.rs index b0b12805..3571efc4 100644 --- a/native/src/command.rs +++ b/native/src/command.rs @@ -36,7 +36,7 @@ impl<T> Command<T> { /// Creates a [`Command`] that performs the action of the given future. pub fn perform<A>( future: impl Future<Output = T> + 'static + MaybeSend, - f: impl Fn(T) -> A + 'static + MaybeSend, + f: impl FnOnce(T) -> A + 'static + MaybeSend, ) -> Command<A> { use iced_futures::futures::FutureExt; @@ -56,7 +56,7 @@ impl<T> Command<T> { /// Applies a transformation to the result of a [`Command`]. pub fn map<A>( self, - f: impl Fn(T) -> A + 'static + MaybeSend + Sync + Clone, + f: impl FnMut(T) -> A + 'static + MaybeSend + Sync + Clone, ) -> Command<A> where T: 'static, diff --git a/native/src/command/action.rs b/native/src/command/action.rs index 3fb02899..549632dd 100644 --- a/native/src/command/action.rs +++ b/native/src/command/action.rs @@ -35,7 +35,7 @@ impl<T> Action<T> { /// [`Command`]: crate::Command pub fn map<A>( self, - f: impl Fn(T) -> A + 'static + MaybeSend + Sync, + f: impl FnMut(T) -> A + 'static + MaybeSend + Sync, ) -> Action<A> where A: 'static, |