diff --git a/src/blocking.rs b/src/blocking.rs index 8c252e7..3431ea4 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -11,9 +11,6 @@ use core::time::Duration; use embedded_hal::delay::DelayUs; -#[cfg(not(feature = "defmt"))] -use log::debug; - #[cfg(feature = "defmt")] use defmt::debug; @@ -132,7 +129,7 @@ where } // Wait for next poll - let _ = self.delay_us(tx_options.poll_interval.as_micros() as u32); + self.delay_us(tx_options.poll_interval.as_micros() as u32); } Ok(()) @@ -215,7 +212,7 @@ where return Err(BlockingError::Timeout); } - let _ = self.delay_us(rx_options.poll_interval.as_micros() as u32); + self.delay_us(rx_options.poll_interval.as_micros() as u32); } } } @@ -264,7 +261,7 @@ where } // Delay before next loop - let _ = self.delay_us(options.poll_interval.as_micros() as u32); + self.delay_us(options.poll_interval.as_micros() as u32); } } } diff --git a/src/lib.rs b/src/lib.rs index 5fe69ad..1b8fe41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,9 +125,9 @@ impl From for BasicChannel { } } -impl Into for BasicChannel { - fn into(self) -> u16 { - self.0 +impl From for u16 { + fn from(val: BasicChannel) -> Self { + val.0 } } @@ -272,7 +272,7 @@ mod tests { impl From for TestRegister1 { fn from(value: u8) -> Self { - Self { value: value } + Self { value } } }