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;
2020 pub mod headless;
2121 pub use headless::Headless;
2222
23+#[allow(clippy::large_enum_variant)]
2324 pub enum Backend {
2425 Tty(Tty),
2526 Winit(Winit),
src/input/mod.rsmodified+1 -1
@@ -4367,7 +4367,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input::
43674367 pub fn mods_with_binds(mod_key: ModKey, binds: &Binds, triggers: &[Trigger]) -> HashSet<Modifiers> {
43684368 let mut rv = HashSet::new();
43694369 for bind in &binds.0 {
4370- if !triggers.iter().any(|trigger| bind.key.trigger == *trigger) {
4370+ if !triggers.contains(&bind.key.trigger) {
43714371 continue;
43724372 }
43734373
src/layout/mod.rsmodified+1 -0
@@ -397,6 +397,7 @@ impl Default for Options {
397397 }
398398 }
399399
400+#[allow(clippy::large_enum_variant)]
400401 #[derive(Debug)]
401402 enum InteractiveMoveState<W: LayoutElement> {
402403 /// Initial rubberbanding; the window remains in the layout.
src/pw_utils.rsmodified+1 -0
@@ -83,6 +83,7 @@ pub struct Cast {
8383 scheduled_redraw: Option<RegistrationToken>,
8484 }
8585
86+#[allow(clippy::large_enum_variant)]
8687 #[derive(Debug)]
8788 pub enum CastState {
8889 ResizePending {
src/render_helpers/render_elements.rsmodified+1 -0
@@ -29,6 +29,7 @@ macro_rules! niri_render_elements {
2929 // in this line, we cannot condition based on $R like elsewhere, so we condition on duplicate
3030 // names instead. Like this: $($name_R<SomeRenderer>)? $($name_no_R)? so only one is chosen.
3131 (@impl $name:ident ($($name_no_R:ident)?) ($($name_R:ident<$R:ident>)?) => { $($variant:ident = $type:ty),+ }) => {
32+ #[allow(clippy::large_enum_variant)]
3233 #[derive(Debug)]
3334 pub enum $name$(<$R: $crate::render_helpers::renderer::NiriRenderer>)? {
3435 $($variant($type)),+