diff options
author | 2023-02-02 16:52:56 +0100 | |
---|---|---|
committer | 2023-02-02 16:52:56 +0100 | |
commit | a35d6d2e4d59f71309f31c87ea5150959d639185 (patch) | |
tree | efd44456685739bce1962146e66002654c9ecb0e /native/src/command | |
parent | 49e9a9a5379c1e9a9469045ca9a51ffb860ee620 (diff) | |
parent | 98a717383acf71d7939d7cc90d350743487f0380 (diff) | |
download | iced-a35d6d2e4d59f71309f31c87ea5150959d639185.tar.gz iced-a35d6d2e4d59f71309f31c87ea5150959d639185.tar.bz2 iced-a35d6d2e4d59f71309f31c87ea5150959d639185.zip |
Merge branch 'iced-rs:master' into master
Diffstat (limited to '')
-rw-r--r-- | native/src/command.rs | 1 | ||||
-rw-r--r-- | native/src/command/action.rs | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/native/src/command.rs b/native/src/command.rs index 89ee7375..ca9d0b64 100644 --- a/native/src/command.rs +++ b/native/src/command.rs @@ -11,6 +11,7 @@ use std::fmt; use std::future::Future; /// A set of asynchronous actions to be performed by some runtime. +#[must_use = "`Command` must be returned to runtime to take effect"] pub struct Command<T>(iced_futures::Command<Action<T>>); impl<T> Command<T> { diff --git a/native/src/command/action.rs b/native/src/command/action.rs index a6954f8f..a51b8c21 100644 --- a/native/src/command/action.rs +++ b/native/src/command/action.rs @@ -58,10 +58,10 @@ impl<T> fmt::Debug for Action<T> { match self { Self::Future(_) => write!(f, "Action::Future"), Self::Clipboard(action) => { - write!(f, "Action::Clipboard({:?})", action) + write!(f, "Action::Clipboard({action:?})") } - Self::Window(action) => write!(f, "Action::Window({:?})", action), - Self::System(action) => write!(f, "Action::System({:?})", action), + Self::Window(action) => write!(f, "Action::Window({action:?})"), + Self::System(action) => write!(f, "Action::System({action:?})"), Self::Widget(_action) => write!(f, "Action::Widget"), } } |