summaryrefslogtreecommitdiffstats
path: root/web/src/command
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-13 11:22:53 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-13 11:24:28 +0700
commit01b945b9814b9dc546e783a6dab66e4f7fe49786 (patch)
treedbc5db40ac2ed11770994e6d65666d81caab7f2e /web/src/command
parent2c630809d403f7fa87c3230be031299e5fb3af17 (diff)
downloadiced-01b945b9814b9dc546e783a6dab66e4f7fe49786.tar.gz
iced-01b945b9814b9dc546e783a6dab66e4f7fe49786.tar.bz2
iced-01b945b9814b9dc546e783a6dab66e4f7fe49786.zip
Write missing docs and `Debug` implementations for `web`
Diffstat (limited to 'web/src/command')
-rw-r--r--web/src/command/action.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/src/command/action.rs b/web/src/command/action.rs
index cf384f07..c0223e50 100644
--- a/web/src/command/action.rs
+++ b/web/src/command/action.rs
@@ -2,6 +2,8 @@ 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")]
@@ -16,3 +18,11 @@ impl<T> Action<T> {
}
}
}
+
+impl<T> fmt::Debug for Action<T> {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ match self {
+ Self::Future(_) => write!(f, "Action::Future"),
+ }
+ }
+}