diff options
| author | 2022-01-31 17:01:19 +0700 | |
|---|---|---|
| committer | 2022-01-31 17:01:19 +0700 | |
| commit | e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683 (patch) | |
| tree | 6e0c9c38366c9d70204c80fc66bd8e8a7652cf52 /native/src/command | |
| parent | c75ed37148b019358b0297171cf31b2577eeb9ae (diff) | |
| parent | 6f604ab3995cb345aacf183a569589988aa3ad1f (diff) | |
| download | iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.gz iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.tar.bz2 iced-e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683.zip | |
Merge pull request #1096 from pacmancoder/feat/wgpu-webgl
Experimental WebGL wgpu backend support
Diffstat (limited to '')
| -rw-r--r-- | native/src/command.rs | 8 | ||||
| -rw-r--r-- | native/src/command/action.rs | 7 | 
2 files changed, 11 insertions, 4 deletions
| diff --git a/native/src/command.rs b/native/src/command.rs index 6fe518d7..89d0f045 100644 --- a/native/src/command.rs +++ b/native/src/command.rs @@ -3,6 +3,8 @@ mod action;  pub use action::Action; +use iced_futures::MaybeSend; +  use std::fmt;  use std::future::Future; @@ -24,8 +26,8 @@ impl<T> Command<T> {      /// Creates a [`Command`] that performs the action of the given future.      pub fn perform<A>( -        future: impl Future<Output = T> + 'static + Send, -        f: impl Fn(T) -> A + 'static + Send, +        future: impl Future<Output = T> + 'static + MaybeSend, +        f: impl Fn(T) -> A + 'static + MaybeSend,      ) -> Command<A> {          use iced_futures::futures::FutureExt; @@ -45,7 +47,7 @@ impl<T> Command<T> {      /// Applies a transformation to the result of a [`Command`].      pub fn map<A>(          self, -        f: impl Fn(T) -> A + 'static + Send + 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 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,      { | 
