diff options
Diffstat (limited to 'components/compositing/touch.rs')
-rw-r--r-- | components/compositing/touch.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/compositing/touch.rs b/components/compositing/touch.rs index 1dbd9914f89..4f20afedd63 100644 --- a/components/compositing/touch.rs +++ b/components/compositing/touch.rs @@ -203,16 +203,15 @@ impl TouchHandler { } pub fn on_event_processed(&mut self, result: EventResult) { - match self.state { - WaitingForScript => self.state = match result { + if let WaitingForScript = self.state { + self.state = match result { EventResult::DefaultPrevented => DefaultPrevented, EventResult::DefaultAllowed => match self.touch_count() { 1 => Touching, 2 => Pinching, _ => MultiTouch, } - }, - _ => {} + } } } |