Skip to content

Commit e216f1b

Browse files
style: format code with rustfmt
1 parent e232112 commit e216f1b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

library/core/src/time.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,17 +307,16 @@ impl Duration {
307307
Duration { secs, nanos: subsec_nanos }
308308
}
309309

310-
311310
/// Creates a new Duration from the specified number of nanoseconds.
312-
///
313-
/// # Panics
311+
///
312+
/// # Panics
314313
///
315314
/// Panics if the given number of weeks overflows the `Duration` size.
316-
/// Use this function if you need to specify time greater than what can fit in u64
315+
/// Use this function if you need to specify time greater than what can fit in u64
317316
/// (around 584 years).
318-
///
319-
/// # Examples
320-
///
317+
///
318+
/// # Examples
319+
///
321320
/// ```
322321
/// #![feature(duration_from_nanos_u128)]
323322
/// use std::time::Duration;
@@ -329,14 +328,14 @@ impl Duration {
329328
#[inline]
330329
pub const fn from_nanos_u128(nanos: u128) -> Duration {
331330
const NANOS_PER_SEC: u128 = self::NANOS_PER_SEC as u128;
332-
let secs : u64 = (nanos/ NANOS_PER_SEC) as u64 ;
331+
let secs: u64 = (nanos / NANOS_PER_SEC) as u64;
333332
let subsec_nanos = (nanos % NANOS_PER_SEC) as u32;
334333
// SAFETY: x % 1_000_000_000 < 1_000_000_000
335334
let subsec_nanos = unsafe { Nanoseconds::new_unchecked(subsec_nanos) };
336335

337336
Duration { secs, nanos: subsec_nanos }
338337
}
339-
338+
340339
/// Creates a new `Duration` from the specified number of weeks.
341340
///
342341
/// # Panics

0 commit comments

Comments
 (0)