From 90afd1db8df17a7afa06b521ccd52455eced9277 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 28 Jan 2022 21:45:30 +0700 Subject: Use `MaybeSend` in `perform` and `map` for `Command` --- native/src/command/action.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'native/src/command/action.rs') 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 { impl Action { /// Applies a transformation to the result of a [`Command`]. - pub fn map(self, f: impl Fn(T) -> A + 'static + Send + Sync) -> Action + pub fn map( + self, + f: impl Fn(T) -> A + 'static + MaybeSend + Sync, + ) -> Action where T: 'static, { -- cgit