Deal with new Clippy warnings
Browse files at this commit4f63e13385cae5c2b6abdc931e7daf84fa62661dParent: 46a8f815 changed files +5 -1
- src/backend/mod.rs +1 -0
- src/input/mod.rs +1 -1
- src/layout/mod.rs +1 -0
- src/pw_utils.rs +1 -0
- src/render_helpers/render_elements.rs +1 -0
src/backend/mod.rsmodified+1 -0
| @@ -20,6 +20,7 @@ pub use winit::Winit; | ||
| 20 | 20 | pub mod headless; |
| 21 | 21 | pub use headless::Headless; |
| 22 | 22 | |
| 23 | +#[allow(clippy::large_enum_variant)] | |
| 23 | 24 | pub enum Backend { |
| 24 | 25 | Tty(Tty), |
| 25 | 26 | Winit(Winit), |
src/input/mod.rsmodified+1 -1
| @@ -4367,7 +4367,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input:: | ||
| 4367 | 4367 | pub fn mods_with_binds(mod_key: ModKey, binds: &Binds, triggers: &[Trigger]) -> HashSet<Modifiers> { |
| 4368 | 4368 | let mut rv = HashSet::new(); |
| 4369 | 4369 | for bind in &binds.0 { |
| 4370 | - if !triggers.iter().any(|trigger| bind.key.trigger == *trigger) { | |
| 4370 | + if !triggers.contains(&bind.key.trigger) { | |
| 4371 | 4371 | continue; |
| 4372 | 4372 | } |
| 4373 | 4373 |
src/layout/mod.rsmodified+1 -0
| @@ -397,6 +397,7 @@ impl Default for Options { | ||
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | +#[allow(clippy::large_enum_variant)] | |
| 400 | 401 | #[derive(Debug)] |
| 401 | 402 | enum InteractiveMoveState<W: LayoutElement> { |
| 402 | 403 | /// Initial rubberbanding; the window remains in the layout. |
src/pw_utils.rsmodified+1 -0
| @@ -83,6 +83,7 @@ pub struct Cast { | ||
| 83 | 83 | scheduled_redraw: Option<RegistrationToken>, |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | +#[allow(clippy::large_enum_variant)] | |
| 86 | 87 | #[derive(Debug)] |
| 87 | 88 | pub enum CastState { |
| 88 | 89 | ResizePending { |
src/render_helpers/render_elements.rsmodified+1 -0
| @@ -29,6 +29,7 @@ macro_rules! niri_render_elements { | ||
| 29 | 29 | // in this line, we cannot condition based on $R like elsewhere, so we condition on duplicate |
| 30 | 30 | // names instead. Like this: $($name_R<SomeRenderer>)? $($name_no_R)? so only one is chosen. |
| 31 | 31 | (@impl $name:ident ($($name_no_R:ident)?) ($($name_R:ident<$R:ident>)?) => { $($variant:ident = $type:ty),+ }) => { |
| 32 | + #[allow(clippy::large_enum_variant)] | |
| 32 | 33 | #[derive(Debug)] |
| 33 | 34 | pub enum $name$(<$R: $crate::render_helpers::renderer::NiriRenderer>)? { |
| 34 | 35 | $($variant($type)),+ |