From a98b2b217c901f8776a2bdb4ebc35ea7611998ce Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Mon, 7 Sep 2026 11:12:40 +0100 Subject: [PATCH] Remove #[non_exhaustive] on enum Ime (#4682) Enum `Ime` should not be `#[non_exhaustive]` since ignoring variants could lead to a mis-match between in-application and external representation of text contents and thus bad behaviour. --- winit-core/src/event.rs | 2 +- winit/examples/ime.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/winit-core/src/event.rs b/winit-core/src/event.rs index b8ac4e2b..8b254632 100644 --- a/winit-core/src/event.rs +++ b/winit-core/src/event.rs @@ -1058,7 +1058,7 @@ impl From for Modifiers { /// ``` #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[non_exhaustive] +#[allow(clippy::exhaustive_enums)] pub enum Ime { /// Notifies when the IME was enabled. /// diff --git a/winit/examples/ime.rs b/winit/examples/ime.rs index 652dac86..fd1ffbd4 100644 --- a/winit/examples/ime.rs +++ b/winit/examples/ime.rs @@ -248,7 +248,6 @@ impl App { } }, Ime::Disabled => info!("IME disabled for Window={:?}", surface.window().id()), - _ => (), } }