Skip to content

Commit

Permalink
Clippy (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
elipsitz authored Sep 26, 2024
1 parent 4f44787 commit d3247c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl From<Duration> for TickType {
let sec_ms = duration.as_secs().saturating_mul(MS_PER_S);
let subsec_ns: u64 = duration.subsec_nanos().into();
// Convert to ms and round up. Not saturating. Cannot overflow.
let subsec_ms = (subsec_ns + (NS_PER_MS - 1)) / NS_PER_MS;
let subsec_ms = subsec_ns.div_ceil(NS_PER_MS);

TickType::new_millis(sec_ms.saturating_add(subsec_ms))
}
Expand Down
4 changes: 0 additions & 4 deletions src/rmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,6 @@ impl<const N: usize> Default for FixedLengthSignal<N> {
/// signal.push(Pulse::new(PinState::High, PulseTicks::new(10)));
/// signal.push(Pulse::new(PinState::Low, PulseTicks::new(9)));
/// ```

#[cfg(feature = "alloc")]
#[derive(Clone, Default)]
pub struct VariableLengthSignal {
Expand Down Expand Up @@ -735,7 +734,6 @@ mod driver {
/// Use [`TxRmtDriver::start()`] or [`TxRmtDriver::start_blocking()`] to transmit pulses.
///
/// See the [rmt module][crate::rmt] for more information.

pub struct TxRmtDriver<'d> {
channel: u8,
_p: PhantomData<&'d mut ()>,
Expand Down Expand Up @@ -896,7 +894,6 @@ mod driver {
/// are no time-gaps between successive transmissions where the perhipheral has to
/// wait for items. This can cause weird behavior and can be counteracted with
/// increasing [`Config::mem_block_num`] or making iteration more efficient.

pub fn start_iter_blocking<T>(&mut self, iter: T) -> Result<(), EspError>
where
T: Iterator<Item = Symbol> + Send,
Expand Down Expand Up @@ -1028,7 +1025,6 @@ mod driver {
/// To uninstall the driver just drop it.
///
/// Internally this calls `rmt_config()` and `rmt_driver_install()`.

pub fn new<C: RmtChannel>(
_channel: impl Peripheral<P = C> + 'd,
pin: impl Peripheral<P = impl InputPin> + 'd,
Expand Down

0 comments on commit d3247c2

Please sign in to comment.