(&mut self, button: T)
| 201 | } |
| 202 | |
| 203 | fn set_down(&mut self, button: T) { |
| 204 | let was_up = self.down.insert(button); |
| 205 | |
| 206 | if was_up { |
| 207 | self.pressed.insert(button); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | fn set_up(&mut self, button: T) { |
| 212 | let was_down = self.down.remove(&button); |