We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f82dd52 commit 627f0b9Copy full SHA for 627f0b9
crates/timestamp/src/lib.rs
@@ -79,7 +79,7 @@ impl std::ops::Sub<Duration> for Timestamp {
79
80
fn sub(self, rhs: Duration) -> Self::Output {
81
match self {
82
- Timestamp::Instant(i) => Timestamp::Instant(i - rhs),
+ Timestamp::Instant(i) => Timestamp::Instant(i.checked_sub(rhs).unwrap()),
83
Timestamp::SystemTime(t) => Timestamp::SystemTime(t - rhs),
84
#[cfg(windows)]
85
Timestamp::PerformanceCounter(c) => Timestamp::PerformanceCounter(c - rhs),
0 commit comments