mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Warn on exhaustive exported enums
Enable clippy::exhaustive_enums in every crate so new exported enums are either #[non_exhaustive] or explicitly allowed as a closed set.
This commit is contained in:
@@ -65,6 +65,8 @@
|
||||
//! ```
|
||||
#![cfg(target_vendor = "apple")] // TODO: Remove once `objc2` allows compiling on all platforms
|
||||
|
||||
#![warn(clippy::exhaustive_enums)]
|
||||
|
||||
#[macro_use]
|
||||
mod util;
|
||||
|
||||
@@ -632,6 +634,7 @@ impl ActiveEventLoopExtMacOS for dyn ActiveEventLoop + '_ {
|
||||
/// The default is `None`.
|
||||
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||
#[allow(clippy::exhaustive_enums)]
|
||||
pub enum OptionAsAlt {
|
||||
/// The left `Option` key is treated as `Alt`.
|
||||
OnlyLeft,
|
||||
|
||||
Reference in New Issue
Block a user