]> git.lizzy.rs Git - rust.git/commitdiff
Fix a copy-paste error in `Instant::sub_duration`
authorTobias Bucher <tobiasbucher5991@gmail.com>
Mon, 24 Apr 2017 23:02:59 +0000 (01:02 +0200)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Mon, 24 Apr 2017 23:02:59 +0000 (01:02 +0200)
Fixes #41514.

src/libstd/sys/unix/time.rs

index a08cec38f732dae6ed8c8da0009080f91d08399d..a1ad94872de5c1ae366dee9d9fe84c1eeaf89259 100644 (file)
@@ -157,7 +157,7 @@ pub fn add_duration(&self, other: &Duration) -> Instant {
         pub fn sub_duration(&self, other: &Duration) -> Instant {
             Instant {
                 t: self.t.checked_sub(dur2intervals(other))
-                       .expect("overflow when adding duration to instant"),
+                       .expect("overflow when subtracting duration from instant"),
             }
         }
     }