-
Notifications
You must be signed in to change notification settings - Fork 543
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: underflow during datetime->nanos conversion #1294
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.4.x #1294 +/- ##
==========================================
+ Coverage 91.33% 91.35% +0.02%
==========================================
Files 38 38
Lines 16971 17034 +63
==========================================
+ Hits 15501 15562 +61
- Misses 1470 1472 +2
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough test case!
src/datetime/tests.rs
Outdated
i64::MAX - 1, | ||
i64::MAX, | ||
] { | ||
println!("nanos: {nanos}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this println!
? Or can you change it so that the test compiles on Rust 1.57 (our MSRV)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs println!("nanos: {}", nanos)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Hopefully there will be in the not-too-distant future.)
fc68cc6
to
9b99830
Compare
Fixes #1289.