Remove DeviceEvent::Added and Removed

This had no real use because we don't expose any information on
`DeviceId` except on Windows. But there we only expose the name. The
assumption is that this was originally added for gamepad support, which
never made it into Winit.
This commit is contained in:
daxpedda 2024-08-05 12:01:31 +02:00 committed by GitHub
parent 586255ac0a
commit b7a7f59298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 48 deletions

View file

@ -460,9 +460,6 @@ impl DeviceId {
/// Note that these events are delivered regardless of input focus.
#[derive(Clone, Debug, PartialEq)]
pub enum DeviceEvent {
Added,
Removed,
/// Change in physical position of a pointing device.
///
/// This represents raw, unfiltered physical motion. Not to be confused with
@ -1104,8 +1101,6 @@ mod tests {
let with_device_event =
|dev_ev| x(event::Event::DeviceEvent { device_id: did, event: dev_ev });
with_device_event(Added);
with_device_event(Removed);
with_device_event(MouseMotion { delta: (0.0, 0.0).into() });
with_device_event(MouseWheel {
delta: event::MouseScrollDelta::LineDelta(0.0, 0.0),