Skip to content

Commit

Permalink
apply clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankurte committed Oct 25, 2023
1 parent 8a5feb8 commit bec03f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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(())
Expand Down Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -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);
}
}
}
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ impl From<u16> for BasicChannel {
}
}

impl Into<u16> for BasicChannel {
fn into(self) -> u16 {
self.0
impl From<BasicChannel> for u16 {
fn from(val: BasicChannel) -> Self {
val.0
}
}

Expand Down Expand Up @@ -272,7 +272,7 @@ mod tests {

impl From<u8> for TestRegister1 {
fn from(value: u8) -> Self {
Self { value: value }
Self { value }
}
}

Expand Down

0 comments on commit bec03f6

Please sign in to comment.