From d7e59a791fe6862f94a38eccf5242f3c32e2423b Mon Sep 17 00:00:00 2001 From: David Cole Date: Fri, 4 Nov 2022 16:00:22 +1300 Subject: [PATCH] clippy cry --- src/buffer.rs | 2 +- src/lib.rs | 3 ++- src/regs.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/buffer.rs b/src/buffer.rs index c952031..f420e06 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -124,7 +124,7 @@ impl RxBufIdent { /// * `read_data` - Function which reads from the corresponding `DATA` /// register. The function should fill the mutable slice with bytes /// received from the CAN bus. - pub fn into_frame<'a, SPIE: Debug, HALE: Debug>( + pub fn into_frame( self, read_data: impl FnOnce(&mut [u8]) -> Result<(), SPIE, HALE>, ) -> Result { diff --git a/src/lib.rs b/src/lib.rs index 07d3046..6267c71 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -495,7 +495,8 @@ where /// Resets the MCP2515. pub fn reset(&mut self, delay: &mut impl DelayMs) -> Result<(), SPIE, CSE> { self.transfer(&mut [Instruction::Reset as u8])?; - // Sleep for 5ms after reset - if the device is in sleep mode it won't respond immediately + // Sleep for 5ms after reset - if the device is in sleep mode it won't respond + // immediately delay.delay_ms(5); Ok(()) diff --git a/src/regs.rs b/src/regs.rs index 9b34d25..85e8848 100644 --- a/src/regs.rs +++ b/src/regs.rs @@ -267,7 +267,7 @@ pub struct Rxb1Ctrl { } impl Rxb1Ctrl { - pub const MASK_RXM: Self = Self::from_bytes([0b0110_000]); + pub const MASK_RXM: Self = Self::from_bytes([0b011_0000]); pub const MASK_FILTHIT: Self = Self::from_bytes([0b0000_0111]); }