about summary refs log tree commit diff
path: root/src/libtime
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-10-31 05:40:15 -0400
committerNiko Matsakis <niko@alum.mit.edu>2014-11-05 09:15:28 -0500
commit4af52eee59ff25a7f636798bdbc3f1bec985828f (patch)
treec2755fd2d374ba8a6fb303d8c977e58be720c8dc /src/libtime
parent98958bcaf403354dff0a390db0206e2e03336180 (diff)
downloadrust-4af52eee59ff25a7f636798bdbc3f1bec985828f.tar.gz
rust-4af52eee59ff25a7f636798bdbc3f1bec985828f.zip
Repair various cases where values of distinct types were being operated
upon (e.g., `&int` added to `int`).
Diffstat (limited to 'src/libtime')
-rw-r--r--src/libtime/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index 590d0bfdcab..ac3574f5a03 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -96,7 +96,7 @@ impl Add<Duration, Timespec> for Timespec {
         let d_sec = other.num_seconds();
         // It is safe to unwrap the nanoseconds, because there cannot be
         // more than one second left, which fits in i64 and in i32.
-        let d_nsec = (other - Duration::seconds(d_sec))
+        let d_nsec = (*other - Duration::seconds(d_sec))
                      .num_nanoseconds().unwrap() as i32;
         let mut sec = self.sec + d_sec;
         let mut nsec = self.nsec + d_nsec;