提交 c25178c9 编写于 作者: N Nathaniel Ringo

Fixes whitespace.

上级 7caf753d
......@@ -114,9 +114,9 @@ pub const fn from_secs(secs: u64) -> Duration {
#[inline]
pub const fn from_millis(millis: u64) -> Duration {
Duration {
secs: millis / MILLIS_PER_SEC,
nanos: ((millis % MILLIS_PER_SEC) as u32) * NANOS_PER_MILLI,
}
secs: millis / MILLIS_PER_SEC,
nanos: ((millis % MILLIS_PER_SEC) as u32) * NANOS_PER_MILLI,
}
}
/// Creates a new `Duration` from the specified number of microseconds.
......@@ -136,9 +136,9 @@ pub const fn from_millis(millis: u64) -> Duration {
#[inline]
pub const fn from_micros(micros: u64) -> Duration {
Duration {
secs: micros / MICROS_PER_SEC,
nanos: ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO,
}
secs: micros / MICROS_PER_SEC,
nanos: ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO,
}
}
/// Creates a new `Duration` from the specified number of nanoseconds.
......@@ -158,9 +158,9 @@ pub const fn from_micros(micros: u64) -> Duration {
#[inline]
pub const fn from_nanos(nanos: u64) -> Duration {
Duration {
secs: nanos / (NANOS_PER_SEC as u64),
nanos: (nanos % (NANOS_PER_SEC as u64)) as u32,
}
secs: nanos / (NANOS_PER_SEC as u64),
nanos: (nanos % (NANOS_PER_SEC as u64)) as u32,
}
}
/// Returns the number of _whole_ seconds contained by this `Duration`.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册