Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
AkiyukiOkayasu committed Feb 16, 2024
1 parent 2c46a9f commit 1f41683
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rp2040-hal/src/gpio/pin/pin_sealed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ where
match pin.bank {
DynBankId::Bank0 => {
let gpio = unsafe { &*pac::PADS_BANK0::PTR };
&gpio.gpio(usize::from(pin.num))
gpio.gpio(usize::from(pin.num))
}
DynBankId::Qspi => unsafe {
let qspi = &*pac::PADS_QSPI::PTR;
Expand Down Expand Up @@ -170,7 +170,7 @@ where
unsafe {
let syscfg = &*pac::SYSCFG::PTR;
match pin.bank {
DynBankId::Bank0 => &syscfg.proc_in_sync_bypass(),
DynBankId::Bank0 => syscfg.proc_in_sync_bypass(),
DynBankId::Qspi => core::mem::transmute(&syscfg.proc_in_sync_bypass_hi()),
}
}
Expand Down
2 changes: 1 addition & 1 deletion rp2040-hal/src/pio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ impl<'a, P: PIOExt, const IRQ: usize> Interrupt<'a, P, IRQ> {
}

unsafe fn irq(&self) -> &crate::pac::pio0::SM_IRQ {
&self.block().sm_irq(IRQ)
self.block().sm_irq(IRQ)
}
}

Expand Down
2 changes: 1 addition & 1 deletion rp2040-hal/src/pwm/reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(super) unsafe trait RegisterInterface {
#[inline]
fn ch(&self) -> &CH {
let num = self.id().num as usize;
unsafe { &(*pac::PWM::ptr()).ch(num) }
unsafe { (*pac::PWM::ptr()).ch(num) }
}

#[inline]
Expand Down

0 comments on commit 1f41683

Please sign in to comment.