Skip to content

Commit 376837b

Browse files
committed
from_micros: Inlined return for consistency
1 parent 4db499f commit 376837b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libstd/time/duration.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,7 @@ impl Duration {
133133
pub fn from_micros(micros: u64) -> Duration {
134134
let secs = micros / MICROS_PER_SEC;
135135
let nanos = ((micros % MICROS_PER_SEC) as u32) * NANOS_PER_MICRO;
136-
Duration {
137-
secs: secs,
138-
nanos: nanos,
139-
}
136+
Duration { secs: secs, nanos: nanos }
140137
}
141138

142139
/// Returns the number of _whole_ seconds contained by this `Duration`.

0 commit comments

Comments
 (0)