diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-17 23:19:45 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-17 23:19:45 +0000 |
| commit | 90f6b56cba8123d51631aec2ceea7262eee149c5 (patch) | |
| tree | 9aec97c4bd61f26f49eeb0e739caabd1c12b0548 /embassy-nrf/src | |
| parent | d81a203ee264c8bb77eaae18944d4cace7b1683c (diff) | |
| parent | f5e251fc8176000a9156e29b25e3a5f18229acc0 (diff) | |
Merge #434
434: Clippy fixes r=Dirbaio a=Dirbaio
Fixes most clippy lints.
Added `#![allow(clippy::new_without_default)]` because I really, really don't agree with `new()` being the same as `default()`...
Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'embassy-nrf/src')
| -rw-r--r-- | embassy-nrf/src/gpio.rs | 2 | ||||
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index be0fac2b0..7896945fb 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs | |||
| @@ -443,7 +443,7 @@ pub trait OptionalPin: Unborrow<Target = Self> + sealed::OptionalPin + Sized { | |||
| 443 | 443 | ||
| 444 | #[inline] | 444 | #[inline] |
| 445 | fn psel_bits(&self) -> u32 { | 445 | fn psel_bits(&self) -> u32 { |
| 446 | self.pin().map_or(1u32 << 31, |pin| Pin::psel_bits(pin)) | 446 | self.pin().map_or(1u32 << 31, Pin::psel_bits) |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | /// Convert from concrete pin type PX_XX to type erased `Option<AnyPin>`. | 449 | /// Convert from concrete pin type PX_XX to type erased `Option<AnyPin>`. |
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index bab49cebb..7ec072ac8 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -22,6 +22,7 @@ pub const PIN_COUNT: usize = 48; | |||
| 22 | #[cfg(not(any(feature = "nrf52833", feature = "nrf52840")))] | 22 | #[cfg(not(any(feature = "nrf52833", feature = "nrf52840")))] |
| 23 | pub const PIN_COUNT: usize = 32; | 23 | pub const PIN_COUNT: usize = 32; |
| 24 | 24 | ||
| 25 | #[allow(clippy::declare_interior_mutable_const)] | ||
| 25 | const NEW_AW: AtomicWaker = AtomicWaker::new(); | 26 | const NEW_AW: AtomicWaker = AtomicWaker::new(); |
| 26 | static CHANNEL_WAKERS: [AtomicWaker; CHANNEL_COUNT] = [NEW_AW; CHANNEL_COUNT]; | 27 | static CHANNEL_WAKERS: [AtomicWaker; CHANNEL_COUNT] = [NEW_AW; CHANNEL_COUNT]; |
| 27 | static PORT_WAKERS: [AtomicWaker; PIN_COUNT] = [NEW_AW; PIN_COUNT]; | 28 | static PORT_WAKERS: [AtomicWaker; PIN_COUNT] = [NEW_AW; PIN_COUNT]; |
