Closed Zomtir closed 5 months ago
Attention: Patch coverage is 96.77419%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 91.81%. Comparing base (
f8cecbe
) to head (80c1bb0
).
Files | Patch % | Lines |
---|---|---|
src/time_delta.rs | 96.77% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Half-open range patterns became stable in Rust 1.59.0, the CI is on an older version so i had to use full ranges
// half-open
..=-1 => (secs - 1, nanos + NANOS_PER_SEC),
NANOS_PER_SEC.. => (secs + 1, nanos - NANOS_PER_SEC),
// full range
i32::MIN..=-1 => (secs - 1, nanos + NANOS_PER_SEC),
NANOS_PER_SEC..=i32::MAX => (secs + 1, nanos - NANOS_PER_SEC),
Half-open range patterns became stable in Rust 1.59.0, the CI is on an older version so i had to use full ranges
The CI is checking our MSRV of 1.61.
Half-open range patterns became stable in Rust 1.59.0, the CI is on an older version so i had to use full ranges
The CI is checking our MSRV of 1.61.
Woops! Half-open ranges work on my system (TM) : Rust 1.74. So it got stable somewhere in between.
Rust 1.66 stabilized the feature: https://blog.rust-lang.org/2022/12/15/Rust-1.66.0.html#other-changes
Adds checked variants of
TimeDelta::mul
andTimeDelta::div
as proposed in #1469.If you spot other unhandled cases let me know.
Regarding
checked_div
, I think it is impossible to overflow because you cannot divide by integers between -1 and +1 other than 0.cc @pitdicker