We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a0c09c commit 8956d2fCopy full SHA for 8956d2f
src/input.rs
@@ -141,13 +141,9 @@ pub fn is_key_repeated(key_code: KeyCode) -> bool {
141
// stores the amount of time each key has been pressed for
142
let time_map = &mut context.keys_repeated;
143
144
- time_map
145
- .entry(key_code)
146
- .or_insert(0.);
+ time_map.entry(key_code).or_insert(0.);
147
148
- let time_pressed = time_map
149
- .get_mut(&key_code)
150
- .unwrap();
+ let time_pressed = time_map.get_mut(&key_code).unwrap();
151
152
if is_key_down(key_code) {
153
*time_pressed += 1.;
0 commit comments