Fix clippy::assign_op_pattern lint (#932)

This commit is contained in:
Hiroaki Yutani 2024-05-03 15:55:41 +09:00 committed by GitHub
parent deafcc4382
commit 7fd9e6476b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,7 +11,7 @@ macro_rules! impl_embedded_hal_delay_fugit {
now + <Self as $crate::Monotonic>::Duration::nanos_at_least(ns.into()); now + <Self as $crate::Monotonic>::Duration::nanos_at_least(ns.into());
if now != done { if now != done {
// Compensate for sub-tick uncertainty // Compensate for sub-tick uncertainty
done = done + <Self as $crate::Monotonic>::Duration::from_ticks(1); done += <Self as $crate::Monotonic>::Duration::from_ticks(1);
} }
while <Self as $crate::Monotonic>::now() < done {} while <Self as $crate::Monotonic>::now() < done {}
@ -35,7 +35,7 @@ macro_rules! impl_embedded_hal_delay_fugit {
now + <Self as $crate::Monotonic>::Duration::millis_at_least(ms.into()); now + <Self as $crate::Monotonic>::Duration::millis_at_least(ms.into());
if now != done { if now != done {
// Compensate for sub-tick uncertainty // Compensate for sub-tick uncertainty
done = done + <Self as $crate::Monotonic>::Duration::from_ticks(1); done += <Self as $crate::Monotonic>::Duration::from_ticks(1);
} }
while <Self as $crate::Monotonic>::now() < done {} while <Self as $crate::Monotonic>::now() < done {}