Skip to content

Commit 5656d67

Browse files
committed
Fix comments
1 parent ca8ef80 commit 5656d67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

embedded-hal/src/delay.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub trait DelayNs {
1616
fn delay_us(&mut self, mut us: u32) {
1717
const MAX_MICROS: u32 = u32::MAX / NANOS_PER_MICRO;
1818

19-
// Avoid potential overflow if micro -> micro conversion is too large
19+
// Avoid potential overflow if micro -> nano conversion is too large
2020
while us > MAX_MICROS {
2121
us -= MAX_MICROS;
2222
self.delay_ns(MAX_MICROS * NANOS_PER_MICRO);
@@ -31,7 +31,7 @@ pub trait DelayNs {
3131
fn delay_ms(&mut self, mut ms: u32) {
3232
const MAX_MILLIS: u32 = u32::MAX / NANOS_PER_MILLI;
3333

34-
// Avoid potential overflow if milli -> micro conversion is too large
34+
// Avoid potential overflow if milli -> nano conversion is too large
3535
while ms > MAX_MILLIS {
3636
ms -= MAX_MILLIS;
3737
self.delay_ns(MAX_MILLIS * NANOS_PER_MILLI);

0 commit comments

Comments
 (0)