forge
Explore
Log in

Don't you dare go Hollow

Deal with new Clippy warnings

Browse files at this commit

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