From: Tobias Bucher Date: Mon, 24 Apr 2017 23:02:59 +0000 (+0200) Subject: Fix a copy-paste error in `Instant::sub_duration` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=957d51aecb3eb4960129b38b147cff0b8d0fae5c;p=rust.git Fix a copy-paste error in `Instant::sub_duration` Fixes #41514. --- diff --git a/src/libstd/sys/unix/time.rs b/src/libstd/sys/unix/time.rs index a08cec38f73..a1ad94872de 100644 --- a/src/libstd/sys/unix/time.rs +++ b/src/libstd/sys/unix/time.rs @@ -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"), } } }