about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorArtyom Pavlov <newpavlov@gmail.com>2018-09-12 11:56:39 +0300
committerGitHub <noreply@github.com>2018-09-12 11:56:39 +0300
commit07c15ea64552bdf78bcbb5224331c03cec7e37a2 (patch)
tree95ab0958390cbc883626fab25a800568c45b2b91 /src/libcore
parent206ca68ff38604325b4479f8b66cbd50cf4c693b (diff)
downloadrust-07c15ea64552bdf78bcbb5224331c03cec7e37a2.tar.gz
rust-07c15ea64552bdf78bcbb5224331c03cec7e37a2.zip
more explicit impl
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/time.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/time.rs b/src/libcore/time.rs
index db5d9480878..e85ac33a419 100644
--- a/src/libcore/time.rs
+++ b/src/libcore/time.rs
@@ -589,7 +589,7 @@ impl Mul<Duration> for u32 {
     type Output = Duration;
 
     fn mul(self, rhs: Duration) -> Duration {
-        rhs * self
+        rhs.checked_mul(self).expect("overflow when multiplying scalar by duration")
     }
 }