Skip to content

Commit 7b168d6

Browse files
committed
rust: Comment cleanup
Comment cleanups. Fix several minor typos in the comments. Signed-off-by: David Brown <[email protected]>
1 parent ec1c9f6 commit 7b168d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rust/zephyr/src/time.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub type Tick = u64;
4545
#[cfg(not(CONFIG_TIMEOUT_64BIT))]
4646
pub type Tick = u32;
4747

48-
/// Duration appropraite for Zephyr calls that expect `k_timeout_t`. The result will be a time
48+
/// Duration appropriate for Zephyr calls that expect `k_timeout_t`. The result will be a time
4949
/// interval from "now" (when the call is made).
5050
pub type Duration = fugit::Duration<Tick, 1, SYS_FREQUENCY>;
5151

@@ -54,7 +54,7 @@ pub type Duration = fugit::Duration<Tick, 1, SYS_FREQUENCY>;
5454
#[cfg(CONFIG_TIMEOUT_64BIT)]
5555
pub type Instant = fugit::Instant<Tick, 1, SYS_FREQUENCY>;
5656

57-
// The zephry k_timeout_t represents several different types of intervals, based on the range of
57+
// The Zephyr `k_timeout_t` represents several different types of intervals, based on the range of
5858
// the value. It is a signed number of the same size as the Tick here, which effectively means it
5959
// is one bit less.
6060
//
@@ -63,13 +63,13 @@ pub type Instant = fugit::Instant<Tick, 1, SYS_FREQUENCY>;
6363
// -1: K_FOREVER: a time that never expires.
6464
// MIN .. -2: A wait for an absolute amount of ticks from the start of the system.
6565
//
66-
// The absolute time offset is only implemented when time is a 64 bit value. This also means that
66+
// The absolute time offset is only implemented when time is a 64-bit value. This also means that
6767
// "Instant" isn't available when time is defined as a 32-bit value.
6868

6969
// Wrapper around the timeout type, so we can implement From/Info.
7070
pub struct Timeout(pub k_timeout_t);
7171

72-
// From allows methods to take a time of various types and convert it into a Zephyr timeout.
72+
// `From` allows methods to take a time of various types and convert it into a Zephyr timeout.
7373
impl From<Duration> for Timeout {
7474
fn from(value: Duration) -> Timeout {
7575
let ticks: k_ticks_t = checked_cast(value.ticks());

0 commit comments

Comments
 (0)