diff options
| author | 2023-11-17 20:27:18 +0000 | |
|---|---|---|
| committer | 2023-11-17 20:33:26 +0000 | |
| commit | ab69fa7ba6bfc83429ffaabc1a24d54696c835f2 (patch) | |
| tree | 80616689b4049100f6ba3bc26606b9d12296e157 | |
| parent | ffce10d11f38ff85a230e1feb3a6a2cb2bbc040b (diff) | |
Update needed for Rust v1.73.0
https://rust-lang.github.io/rust-clippy/master/index.html#/unwrap_or_default
bug: http://b/303252546
Change-Id: I1650c8109559c8818d796d01269b994802a1ed21
| -rw-r--r-- | libs/input/rust/input_verifier.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libs/input/rust/input_verifier.rs b/libs/input/rust/input_verifier.rs index 5f05a0f454..b60d7c971e 100644 --- a/libs/input/rust/input_verifier.rs +++ b/libs/input/rust/input_verifier.rs @@ -124,10 +124,7 @@ impl InputVerifier { self.name, device_id, self.touching_pointer_ids_by_device )); } - let it = self - .touching_pointer_ids_by_device - .entry(device_id) - .or_insert_with(HashSet::new); + let it = self.touching_pointer_ids_by_device.entry(device_id).or_default(); it.insert(pointer_properties[0].id); } MotionAction::PointerDown { action_index } => { @@ -224,19 +221,13 @@ impl InputVerifier { self.name, device_id, self.hovering_pointer_ids_by_device )); } - let it = self - .hovering_pointer_ids_by_device - .entry(device_id) - .or_insert_with(HashSet::new); + let it = self.hovering_pointer_ids_by_device.entry(device_id).or_default(); it.insert(pointer_properties[0].id); } MotionAction::HoverMove => { // For compatibility reasons, we allow HOVER_MOVE without a prior HOVER_ENTER. // If there was no prior HOVER_ENTER, just start a new hovering pointer. - let it = self - .hovering_pointer_ids_by_device - .entry(device_id) - .or_insert_with(HashSet::new); + let it = self.hovering_pointer_ids_by_device.entry(device_id).or_default(); it.insert(pointer_properties[0].id); } MotionAction::HoverExit => { |