Write missing docs and Debug implementations for web

This commit is contained in:
Héctor Ramón Jiménez 2021-09-13 11:22:53 +07:00
parent 2c630809d4
commit 01b945b981
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 22 additions and 2 deletions

View file

@ -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"),
}
}
}