about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorClaudio Bley <cbley@exa-online.de>2018-06-04 08:58:55 +0200
committerClaudio Bley <cbley@exa-online.de>2018-06-04 08:59:09 +0200
commit33c4b37d00985f8f12796ef1b0b8ff97a4f3db99 (patch)
treec14c155c306ebdb1e7d2c63f35a95d10f206b348 /src/libstd/sys
parent95e2bf253d864c5e14ad000ffa2040ce85916056 (diff)
downloadrust-33c4b37d00985f8f12796ef1b0b8ff97a4f3db99.tar.gz
rust-33c4b37d00985f8f12796ef1b0b8ff97a4f3db99.zip
Clarify error phrase in `sub_instant` function
Uses the same wording as [`src/libstd/sys/windows/time.rs`][1].

1: https://github.com/avdv/rust/blob/95e2bf253d864c5e14ad000ffa2040ce85916056/src/libstd/sys/windows/time.rs#L65
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/redox/time.rs2
-rw-r--r--src/libstd/sys/unix/time.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/redox/time.rs b/src/libstd/sys/redox/time.rs
index cf798500b7f..5c491115c55 100644
--- a/src/libstd/sys/redox/time.rs
+++ b/src/libstd/sys/redox/time.rs
@@ -144,7 +144,7 @@ impl Instant {
 
     pub fn sub_instant(&self, other: &Instant) -> Duration {
         self.t.sub_timespec(&other.t).unwrap_or_else(|_| {
-            panic!("other was less than the current instant")
+            panic!("specified instant was later than self")
         })
     }
 
diff --git a/src/libstd/sys/unix/time.rs b/src/libstd/sys/unix/time.rs
index f7459cb55d5..89786eb2a6c 100644
--- a/src/libstd/sys/unix/time.rs
+++ b/src/libstd/sys/unix/time.rs
@@ -289,7 +289,7 @@ mod inner {
 
         pub fn sub_instant(&self, other: &Instant) -> Duration {
             self.t.sub_timespec(&other.t).unwrap_or_else(|_| {
-                panic!("other was greater than the current instant")
+                panic!("specified instant was later than self")
             })
         }