From afef368d8a920c7702048d3b1604b2046fe46ff8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 3 Feb 2025 03:22:10 +0100 Subject: Take `Event` by reference in `Widget::update` --- examples/game_of_life/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/game_of_life/src') diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index 1008e477..dec3df7f 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -380,7 +380,7 @@ mod grid { fn update( &self, interaction: &mut Interaction, - event: Event, + event: &Event, bounds: Rectangle, cursor: mouse::Cursor, ) -> Option> { @@ -471,7 +471,7 @@ mod grid { _ => action.and_capture(), }) } - mouse::Event::WheelScrolled { delta } => match delta { + mouse::Event::WheelScrolled { delta } => match *delta { mouse::ScrollDelta::Lines { y, .. } | mouse::ScrollDelta::Pixels { y, .. } => { if y < 0.0 && self.scaling > Self::MIN_SCALING -- cgit