Skip to content

Commit 68ae4f1

Browse files
committed
clippy
1 parent 9cf2d52 commit 68ae4f1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/flash.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ impl Error {
3232
}
3333

3434
/// Flash methods implemented for `stm32::FLASH`
35+
#[allow(clippy::len_without_is_empty)]
3536
pub trait FlashExt {
3637
/// Memory-mapped address
3738
fn address(&self) -> usize;

src/gpio/convert.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,17 +603,17 @@ impl<MODE, const P: char, const N: u8> Pin<MODE, P, N> {
603603
fn mode<M: PinMode>(&mut self) {
604604
let offset = 2 * N;
605605
unsafe {
606-
&(*Gpio::<P>::ptr()).pupdr.modify(|r, w| {
606+
(*Gpio::<P>::ptr()).pupdr.modify(|r, w| {
607607
w.bits((r.bits() & !(0b11 << offset)) | (u32::from(M::PUPDR) << offset))
608608
});
609609

610610
if let Some(otyper) = M::OTYPER {
611-
&(*Gpio::<P>::ptr())
611+
(*Gpio::<P>::ptr())
612612
.otyper
613613
.modify(|r, w| w.bits(r.bits() & !(0b1 << N) | (u32::from(otyper) << N)));
614614
}
615615

616-
&(*Gpio::<P>::ptr()).moder.modify(|r, w| {
616+
(*Gpio::<P>::ptr()).moder.modify(|r, w| {
617617
w.bits((r.bits() & !(0b11 << offset)) | (u32::from(M::MODER) << offset))
618618
});
619619
}

0 commit comments

Comments
 (0)