Skip to content

Commit 533c0f0

Browse files
authored
fix tests
1 parent c5cbea6 commit 533c0f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libcore/time.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ impl Duration {
464464
///
465465
/// # Examples
466466
/// ```
467+
/// #![feature(exact_chunks)]
467468
/// use std::time::Duration;
468469
///
469470
/// let dur = Duration::new(2, 700_000_000);
@@ -497,6 +498,7 @@ impl Duration {
497498
///
498499
/// # Examples
499500
/// ```
501+
/// #![feature(exact_chunks)]
500502
/// use std::time::Duration;
501503
///
502504
/// let dur = Duration::new(2, 700_000_000);
@@ -531,6 +533,7 @@ impl Duration {
531533
///
532534
/// # Examples
533535
/// ```
536+
/// #![feature(exact_chunks)]
534537
/// use std::time::Duration;
535538
///
536539
/// let dur1 = Duration::new(2, 700_000_000);
@@ -595,7 +598,7 @@ impl Mul<Duration> for u32 {
595598
type Output = Duration;
596599

597600
fn mul(self, rhs: Duration) -> Duration {
598-
rhs.checked_mul(self).expect("overflow when multiplying scalar by duration")
601+
rhs * self
599602
}
600603
}
601604

0 commit comments

Comments
 (0)