From 533c0f0d1f0501dbd0ca76fd4231660835d9e83b Mon Sep 17 00:00:00 2001 From: Artyom Pavlov Date: Wed, 12 Sep 2018 17:10:38 +0300 Subject: [PATCH] fix tests --- src/libcore/time.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcore/time.rs b/src/libcore/time.rs index 294c9992697..71eb00781f0 100644 --- a/src/libcore/time.rs +++ b/src/libcore/time.rs @@ -464,6 +464,7 @@ impl Duration { /// /// # Examples /// ``` + /// #![feature(exact_chunks)] /// use std::time::Duration; /// /// let dur = Duration::new(2, 700_000_000); @@ -497,6 +498,7 @@ impl Duration { /// /// # Examples /// ``` + /// #![feature(exact_chunks)] /// use std::time::Duration; /// /// let dur = Duration::new(2, 700_000_000); @@ -531,6 +533,7 @@ impl Duration { /// /// # Examples /// ``` + /// #![feature(exact_chunks)] /// use std::time::Duration; /// /// let dur1 = Duration::new(2, 700_000_000); @@ -595,7 +598,7 @@ impl Mul for u32 { type Output = Duration; fn mul(self, rhs: Duration) -> Duration { - rhs.checked_mul(self).expect("overflow when multiplying scalar by duration") + rhs * self } }