Skip to content

Commit 957d51a

Browse files
committed
Fix a copy-paste error in Instant::sub_duration
Fixes #41514.
1 parent 63c7721 commit 957d51a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/sys/unix/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ mod inner {
157157
pub fn sub_duration(&self, other: &Duration) -> Instant {
158158
Instant {
159159
t: self.t.checked_sub(dur2intervals(other))
160-
.expect("overflow when adding duration to instant"),
160+
.expect("overflow when subtracting duration from instant"),
161161
}
162162
}
163163
}

0 commit comments

Comments
 (0)