Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Bastian committed Mar 4, 2025
1 parent 055df19 commit 5a7dde9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions esp-hal/src/rtc_cntl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,12 @@ impl<'d> Rtc<'d> {

// We can detect if we wrapped the boot time by checking if rtc time is greater
// than the amount of time we would've wrapped.
let current_time_us = if rtc_time_us > wrapped_boot_time_us {
if rtc_time_us > wrapped_boot_time_us {
// We also just checked that this won't overflow
rtc_time_us - wrapped_boot_time_us
} else {
boot_time_us + rtc_time_us
};

current_time_us
}
}

/// Set the current time in microseconds.
Expand Down

0 comments on commit 5a7dde9

Please sign in to comment.