Use MaybeSend in perform and map for Command

This commit is contained in:
Héctor Ramón Jiménez 2022-01-28 21:45:30 +07:00
parent e730d97f61
commit 90afd1db8d
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 17 additions and 5 deletions

View file

@ -1,4 +1,6 @@
//! Access the clipboard.
use iced_futures::MaybeSend;
use std::fmt;
/// A buffer for short-term storage and transfer within and between
@ -36,7 +38,10 @@ pub enum Action<T> {
impl<T> Action<T> {
/// Maps the output of a clipboard [`Action`] using the provided closure.
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,
{