-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: lossy truncation in checked Instant
arithmetic
#110
fix: lossy truncation in checked Instant
arithmetic
#110
Conversation
Fixes and tests metrics-rs#109. Signed-off-by: Nissa <[email protected]>
Signed-off-by: Nissa <[email protected]>
The main thing we care about here is that the Duration is not truncated. Signed-off-by: Nissa <[email protected]>
Looks like merging is blocked on a test runner for WASM. I don't have experience with WASM infrastructure so its not clear to me where in Rust the issue is. |
Hmm, weird. I'll try and take a look at this today or tomorrow. |
Gah, the WASM stuff is so finicky. Since it seems pretty obvious that it's not relevant to ensure that the WASM tests pass for this change, I'm going to merge as-is. |
Will cut a release shortly. |
Released as Thanks again for your contribution! |
Thanks! Happy to help. |
Fixes and tests #109.
Unresolved Questions
The test case currently asserts that offsets ofRemoved as of caae5341 << 64
nanos always overflow, which relies onInstant
s being implemented as 64-bit nanosecond counts. It would be correct just to check that theInstant
is not left unchanged, so should I remove those last two assertions?