+fn merge_message(presses: &mut HashMap<MessageKey, Range>, message: Message) {
+ if let Some(r) = presses.get_mut(&message.key) {
+ if !r.contains(&message.t) {
+ r.extend(&message.t);
+ }
+ } else {
+ presses.insert(message.key, Range::new(&message.t));
+ }
+}
+