Skip to content

Commit 8a23b98

Browse files
committed
clippy: fix new lint errors with 1.80
1 parent e9be823 commit 8a23b98

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ stm32h562 = ["stm32h5/stm32h562", "device-selected", "rm0481"]
2929
stm32h563 = ["stm32h5/stm32h563", "device-selected", "rm0481"]
3030
stm32h573 = ["stm32h5/stm32h573", "device-selected", "rm0481"]
3131
# Flags for examples
32-
log-itm = ["dep:log"]
33-
log-rtt = ["dep:log"]
34-
log-semihost = ["dep:log"]
32+
log = ["dep:log"]
33+
log-itm = ["log"]
34+
log-rtt = ["log"]
35+
log-semihost = ["log"]
3536

3637
[dependencies]
3738
cortex-m = { version = "^0.7.7", features = ["critical-section-single-core"] }

src/time.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ pub struct Instant {
3131
}
3232

3333
impl Instant {
34+
pub fn new(now: u32) -> Self {
35+
Self { now }
36+
}
37+
3438
/// Ticks elapsed since the `Instant` was created
3539
pub fn elapsed(&self) -> u32 {
3640
DWT::cycle_count().wrapping_sub(self.now)

0 commit comments

Comments
 (0)