From 5c210a37a7084c55ffc826d331ce98e15983a759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 18 Dec 2022 11:17:01 +0000 Subject: [PATCH] feat: new allow clippy operation --- src/pad.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pad.rs b/src/pad.rs index 0f2298ff..f99e0a85 100644 --- a/src/pad.rs +++ b/src/pad.rs @@ -54,13 +54,17 @@ impl Pad { match addr & 0x00ff { 0x0000 => { let mut value = match self.selection { - PadSelection::Action => { + PadSelection::Action => + { + #[allow(clippy::bool_to_int_with_if)] (if self.a { 0x00 } else { 0x01 } | if self.b { 0x00 } else { 0x02 } | if self.select { 0x00 } else { 0x04 } | if self.start { 0x00 } else { 0x08 }) } - PadSelection::Direction => { + PadSelection::Direction => + { + #[allow(clippy::bool_to_int_with_if)] (if self.right { 0x00 } else { 0x01 } | if self.left { 0x00 } else { 0x02 } | if self.up { 0x00 } else { 0x04 } -- GitLab