from_micros: Inlined return for consistency

This commit is contained in:
Romain Porte 2017-09-09 11:46:58 +02:00
parent 4db499ff10
commit 376837b999

View file

@ -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`.