summaryrefslogtreecommitdiffstats
path: root/examples/clock
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-18 22:13:52 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-03-18 22:13:52 +0700
commit32fd8dadda6636b11d4a1d9f59b467e57b3706a8 (patch)
tree6acb0c0d0a14c032939412f8d177dc08c5fd75aa /examples/clock
parentd7100fd2597da82d97eaf196d50573ea64f3f8ff (diff)
downloadiced-32fd8dadda6636b11d4a1d9f59b467e57b3706a8.tar.gz
iced-32fd8dadda6636b11d4a1d9f59b467e57b3706a8.tar.bz2
iced-32fd8dadda6636b11d4a1d9f59b467e57b3706a8.zip
Reintroduce generic `Message` type for `canvas::Program`
As it is useful to make the `Message` completely free in many implementations.
Diffstat (limited to 'examples/clock')
-rw-r--r--examples/clock/src/main.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index 41d160c1..3b8a1d6a 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -76,9 +76,7 @@ impl Application for Clock {
}
}
-impl canvas::Program for Clock {
- type Message = Message;
-
+impl<Message> canvas::Program<Message> for Clock {
fn draw(&self, bounds: Rectangle, _cursor: Cursor) -> Vec<Geometry> {
let clock = self.clock.draw(bounds.size(), |frame| {
let center = frame.center();