(&mut self, button: T)
| 209 | } |
| 210 | |
| 211 | fn set_up(&mut self, button: T) { |
| 212 | let was_down = self.down.remove(&button); |
| 213 | |
| 214 | if was_down { |
| 215 | self.released.insert(button); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | fn is_down(&self, button: T) -> bool { |
| 220 | self.down.contains(&button) |