diff --git a/src/pad.rs b/src/pad.rs index 0f2298ffe9350cdf3bdcd1aa0f7adaaa2a364962..f99e0a85a2b43b5705845039b9908bbc780609f7 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 }