Skip to content

Commit 33c4b37

Browse files
committed
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
1 parent 95e2bf2 commit 33c4b37

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libstd/sys/redox/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Instant {
144144

145145
pub fn sub_instant(&self, other: &Instant) -> Duration {
146146
self.t.sub_timespec(&other.t).unwrap_or_else(|_| {
147-
panic!("other was less than the current instant")
147+
panic!("specified instant was later than self")
148148
})
149149
}
150150

src/libstd/sys/unix/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ mod inner {
289289

290290
pub fn sub_instant(&self, other: &Instant) -> Duration {
291291
self.t.sub_timespec(&other.t).unwrap_or_else(|_| {
292-
panic!("other was greater than the current instant")
292+
panic!("specified instant was later than self")
293293
})
294294
}
295295

0 commit comments

Comments
 (0)