summaryrefslogtreecommitdiffstats
path: root/examples/multitouch
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-03 03:22:10 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-04 01:26:59 +0100
commitafef368d8a920c7702048d3b1604b2046fe46ff8 (patch)
tree956ce409f5969cfd6b163796f141213c6235b805 /examples/multitouch
parent1b01d6718bf0c6b652a3256df51727c3e72fdd9e (diff)
downloadiced-afef368d8a920c7702048d3b1604b2046fe46ff8.tar.gz
iced-afef368d8a920c7702048d3b1604b2046fe46ff8.tar.bz2
iced-afef368d8a920c7702048d3b1604b2046fe46ff8.zip
Take `Event` by reference in `Widget::update`
Diffstat (limited to 'examples/multitouch')
-rw-r--r--examples/multitouch/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/multitouch/src/main.rs b/examples/multitouch/src/main.rs
index 5f4a5c90..bda3b8f7 100644
--- a/examples/multitouch/src/main.rs
+++ b/examples/multitouch/src/main.rs
@@ -55,11 +55,11 @@ impl canvas::Program<Message> for Multitouch {
fn update(
&self,
_state: &mut Self::State,
- event: Event,
+ event: &Event,
_bounds: Rectangle,
_cursor: mouse::Cursor,
) -> Option<canvas::Action<Message>> {
- let message = match event {
+ let message = match event.clone() {
Event::Touch(
touch::Event::FingerPressed { id, position }
| touch::Event::FingerMoved { id, position },