diff options
author | 2022-01-31 17:01:19 +0700 | |
---|---|---|
committer | 2022-01-31 17:01:19 +0700 | |
commit | e4ef29ef20724c3d1a4beff39ddfdaf6d45f9683 (patch) | |
tree | 6e0c9c38366c9d70204c80fc66bd8e8a7652cf52 /web/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 'web/src/command')
-rw-r--r-- | web/src/command/action.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/web/src/command/action.rs b/web/src/command/action.rs deleted file mode 100644 index c0223e50..00000000 --- a/web/src/command/action.rs +++ /dev/null @@ -1,28 +0,0 @@ -pub enum Action<T> { - Future(iced_futures::BoxFuture<T>), -} - -use std::fmt; - -impl<T> Action<T> { - /// Applies a transformation to the result of a [`Command`]. - #[cfg(target_arch = "wasm32")] - pub fn map<A>(self, f: impl Fn(T) -> A + 'static) -> Action<A> - where - T: 'static, - { - use iced_futures::futures::FutureExt; - - match self { - Self::Future(future) => Action::Future(Box::pin(future.map(f))), - } - } -} - -impl<T> fmt::Debug for Action<T> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Self::Future(_) => write!(f, "Action::Future"), - } - } -} |