Use MaybeSend in perform and map for Command
This commit is contained in:
parent
e730d97f61
commit
90afd1db8d
3 changed files with 17 additions and 5 deletions
|
|
@ -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,
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue