Clippy fixes

This commit is contained in:
Dario Nieuwenhuis
2021-10-18 00:55:43 +02:00
parent d81a203ee2
commit a2e7c24e00
20 changed files with 35 additions and 29 deletions

View File

@ -443,7 +443,7 @@ pub trait OptionalPin: Unborrow<Target = Self> + sealed::OptionalPin + Sized {
#[inline]
fn psel_bits(&self) -> u32 {
self.pin().map_or(1u32 << 31, |pin| Pin::psel_bits(pin))
self.pin().map_or(1u32 << 31, Pin::psel_bits)
}
/// Convert from concrete pin type PX_XX to type erased `Option<AnyPin>`.

View File

@ -22,6 +22,7 @@ pub const PIN_COUNT: usize = 48;
#[cfg(not(any(feature = "nrf52833", feature = "nrf52840")))]
pub const PIN_COUNT: usize = 32;
#[allow(clippy::declare_interior_mutable_const)]
const NEW_AW: AtomicWaker = AtomicWaker::new();
static CHANNEL_WAKERS: [AtomicWaker; CHANNEL_COUNT] = [NEW_AW; CHANNEL_COUNT];
static PORT_WAKERS: [AtomicWaker; PIN_COUNT] = [NEW_AW; PIN_COUNT];