Fixes whitespace.
This commit is contained in:
@@ -114,9 +114,9 @@ impl Duration {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub const fn from_millis(millis: u64) -> Duration {
|
pub const fn from_millis(millis: u64) -> Duration {
|
||||||
Duration {
|
Duration {
|
||||||
secs: millis / MILLIS_PER_SEC,
|
secs: millis / MILLIS_PER_SEC,
|
||||||
nanos: ((millis % MILLIS_PER_SEC) as u32) * NANOS_PER_MILLI,
|
nanos: ((millis % MILLIS_PER_SEC) as u32) * NANOS_PER_MILLI,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new `Duration` from the specified number of microseconds.
|
/// Creates a new `Duration` from the specified number of microseconds.
|
||||||
@@ -136,9 +136,9 @@ impl Duration {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub const fn from_micros(micros: u64) -> Duration {
|
pub const fn from_micros(micros: u64) -> Duration {
|
||||||
Duration {
|
Duration {
|
||||||
secs: micros / MICROS_PER_SEC,
|
secs: micros / MICROS_PER_SEC,
|
||||||
nanos: ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO,
|
nanos: ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new `Duration` from the specified number of nanoseconds.
|
/// Creates a new `Duration` from the specified number of nanoseconds.
|
||||||
@@ -158,9 +158,9 @@ impl Duration {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub const fn from_nanos(nanos: u64) -> Duration {
|
pub const fn from_nanos(nanos: u64) -> Duration {
|
||||||
Duration {
|
Duration {
|
||||||
secs: nanos / (NANOS_PER_SEC as u64),
|
secs: nanos / (NANOS_PER_SEC as u64),
|
||||||
nanos: (nanos % (NANOS_PER_SEC as u64)) as u32,
|
nanos: (nanos % (NANOS_PER_SEC as u64)) as u32,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the number of _whole_ seconds contained by this `Duration`.
|
/// Returns the number of _whole_ seconds contained by this `Duration`.
|
||||||
|
|||||||
Reference in New Issue
Block a user