diff options
author | 2022-08-17 15:54:31 +0200 | |
---|---|---|
committer | 2022-08-17 15:54:31 +0200 | |
commit | 23229e00f608585bf2d623709a4240296721777d (patch) | |
tree | df779ca4b46105fc8db6395d2480f07f83a9114a /native/src/command | |
parent | f21d1209aa576a3e597c100fa56afe554dc2babd (diff) | |
download | iced-23229e00f608585bf2d623709a4240296721777d.tar.gz iced-23229e00f608585bf2d623709a4240296721777d.tar.bz2 iced-23229e00f608585bf2d623709a4240296721777d.zip |
Use `FnOnce` in `Command::perform`
... and revert `FnMut` usage.
Diffstat (limited to '')
-rw-r--r-- | native/src/command.rs | 2 | ||||
-rw-r--r-- | native/src/command/action.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/native/src/command.rs b/native/src/command.rs index 3571efc4..89ee7375 100644 --- a/native/src/command.rs +++ b/native/src/command.rs @@ -56,7 +56,7 @@ impl<T> Command<T> { /// Applies a transformation to the result of a [`Command`]. pub fn map<A>( self, - f: impl FnMut(T) -> A + 'static + MaybeSend + Sync + Clone, + f: impl Fn(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 549632dd..3fb02899 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 FnMut(T) -> A + 'static + MaybeSend + Sync, + f: impl Fn(T) -> A + 'static + MaybeSend + Sync, ) -> Action<A> where A: 'static, |