From b1ba44a97d968fde02cbab6d3575ff9b68eac56a Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Mon, 17 Apr 2017 15:54:34 +0200 Subject: [PATCH] Properly modify scroll_location --- ports/glutin/window.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index e044594ab0cd..01ba7284dfcc 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -540,10 +540,10 @@ impl Window { } /// Helper function to send a scroll event. - fn scroll_window(&self, scroll_location: ScrollLocation, phase: TouchEventType) { + fn scroll_window(&self, mut scroll_location: ScrollLocation, phase: TouchEventType) { // Scroll events snap to the major axis of movement, with vertical // preferred over horizontal. - if let ScrollLocation::Delta(mut delta) = scroll_location { + if let ScrollLocation::Delta(ref mut delta) = scroll_location { if delta.y.abs() >= delta.x.abs() { delta.x = 0.0; } else {