diff options
author | 2022-01-28 21:45:30 +0700 | |
---|---|---|
committer | 2022-01-28 21:51:13 +0700 | |
commit | 90afd1db8df17a7afa06b521ccd52455eced9277 (patch) | |
tree | 6d72f34e4e2953d8d02e18b209b8246e9c32e262 /native/src/command/action.rs | |
parent | e730d97f61bc2edc77d2f061b6a763c4d0a948df (diff) | |
download | iced-90afd1db8df17a7afa06b521ccd52455eced9277.tar.gz iced-90afd1db8df17a7afa06b521ccd52455eced9277.tar.bz2 iced-90afd1db8df17a7afa06b521ccd52455eced9277.zip |
Use `MaybeSend` in `perform` and `map` for `Command`
Diffstat (limited to '')
-rw-r--r-- | native/src/command/action.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/command/action.rs b/native/src/command/action.rs index 77be1b59..5c7509c8 100644 --- a/native/src/command/action.rs +++ b/native/src/command/action.rs @@ -1,6 +1,8 @@ use crate::clipboard; use crate::window; +use iced_futures::MaybeSend; + use std::fmt; /// An action that a [`Command`] can perform. @@ -19,7 +21,10 @@ pub enum Action<T> { impl<T> Action<T> { /// Applies a transformation to the result of a [`Command`]. - pub fn map<A>(self, f: impl Fn(T) -> A + 'static + Send + Sync) -> Action<A> + pub fn map<A>( + self, + f: impl Fn(T) -> A + 'static + MaybeSend + Sync, + ) -> Action<A> where T: 'static, { |