summaryrefslogtreecommitdiffstats
path: root/src/application.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-14 22:51:52 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-07-14 22:51:52 +0200
commitfd0abe18d0cfde614cc779fa0da71c4e07107b59 (patch)
tree12c028c04b3525244815a1d9f41267253557227e /src/application.rs
parentd9a29f51760efc0b2a9d3b0947c15c51897a7a5e (diff)
downloadiced-fd0abe18d0cfde614cc779fa0da71c4e07107b59.tar.gz
iced-fd0abe18d0cfde614cc779fa0da71c4e07107b59.tar.bz2
iced-fd0abe18d0cfde614cc779fa0da71c4e07107b59.zip
Implement `application::Update` for `()`
Diffstat (limited to 'src/application.rs')
-rw-r--r--src/application.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/application.rs b/src/application.rs
index f5e06471..71cb6a7f 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -417,6 +417,16 @@ pub trait Update<State, Message> {
) -> impl Into<Task<Message>>;
}
+impl<State, Message> Update<State, Message> for () {
+ fn update(
+ &self,
+ _state: &mut State,
+ _message: Message,
+ ) -> impl Into<Task<Message>> {
+ ()
+ }
+}
+
impl<T, State, Message, C> Update<State, Message> for T
where
T: Fn(&mut State, Message) -> C,