from_micros: Inlined return for consistency
This commit is contained in:
parent
4db499ff10
commit
376837b999
1 changed files with 1 additions and 4 deletions
|
|
@ -133,10 +133,7 @@ impl Duration {
|
|||
pub fn from_micros(micros: u64) -> Duration {
|
||||
let secs = micros / MICROS_PER_SEC;
|
||||
let nanos = ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO;
|
||||
Duration {
|
||||
secs: secs,
|
||||
nanos: nanos,
|
||||
}
|
||||
Duration { secs: secs, nanos: nanos }
|
||||
}
|
||||
|
||||
/// Returns the number of _whole_ seconds contained by this `Duration`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue