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
diff --git a/libs/input/rust/input_verifier.rs b/libs/input/rust/input_verifier.rs
index 5f05a0f..b60d7c9 100644
--- a/libs/input/rust/input_verifier.rs
+++ b/libs/input/rust/input_verifier.rs
@@ -124,10 +124,7 @@
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 @@
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 => {