From 54b3ebfb5f1d1c107f233091dc39686e41704c5c Mon Sep 17 00:00:00 2001 From: Justin Beaurivage Date: Thu, 2 Jan 2025 20:29:02 -0500 Subject: [PATCH] refactor: Satisfy recent nightly clippy lint additions --- hal/src/peripherals/eic/d11/pin.rs | 4 ++-- hal/src/sercom/i2c/reg.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hal/src/peripherals/eic/d11/pin.rs b/hal/src/peripherals/eic/d11/pin.rs index c85ad0e64eb7..9b3148fe5df9 100644 --- a/hal/src/peripherals/eic/d11/pin.rs +++ b/hal/src/peripherals/eic/d11/pin.rs @@ -55,7 +55,7 @@ where self.chan .eic .evctrl() - .modify(|r, w| unsafe { w.bits(r.bits() | 1 << P::ChId::ID) }); + .modify(|r, w| unsafe { w.bits(r.bits() | (1 << P::ChId::ID)) }); } pub fn enable_interrupt(&mut self) { @@ -69,7 +69,7 @@ where self.chan .eic .wakeup() - .modify(|r, w| unsafe { w.bits(r.bits() | 1 << P::ChId::ID) }) + .modify(|r, w| unsafe { w.bits(r.bits() | (1 << P::ChId::ID)) }) } pub fn disable_interrupt(&mut self) { diff --git a/hal/src/sercom/i2c/reg.rs b/hal/src/sercom/i2c/reg.rs index 41dc725499b3..8d02510c461b 100644 --- a/hal/src/sercom/i2c/reg.rs +++ b/hal/src/sercom/i2c/reg.rs @@ -543,5 +543,5 @@ fn encode_write_address(addr_7_bits: u8) -> u16 { } fn encode_read_address(addr_7_bits: u8) -> u16 { - (addr_7_bits as u16) << 1 | 1 + ((addr_7_bits as u16) << 1) | 1 }