From baa7d2b96eaf199cc0ab8d3eefb533eebb7faa40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Fri, 13 Jun 2025 15:48:24 +0200 Subject: [PATCH] Merge consecutive `Mouse::Release` instructions --- test/src/instruction.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/src/instruction.rs b/test/src/instruction.rs index bdfa0d48..ba4867ba 100644 --- a/test/src/instruction.rs +++ b/test/src/instruction.rs @@ -127,6 +127,22 @@ impl Interaction { None, ) } + ( + current @ Mouse::Release { + button: button_a, + at: at_a, + } + | current @ Mouse::Click { + button: button_a, + at: at_a, + }, + Mouse::Release { + button: button_b, + at: at_b, + }, + ) if button_a == button_b && at_a == at_b => { + (Self::Mouse(current), None) + } (current, next) => { (Self::Mouse(current), Some(Self::Mouse(next))) }