-
Notifications
You must be signed in to change notification settings - Fork 532
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
Document panics in Add
/Sub
impls and use expect
#1316
Conversation
3dcf200
to
cdecf2a
Compare
Codecov Report
@@ Coverage Diff @@
## 0.4.x #1316 +/- ##
==========================================
+ Coverage 91.25% 91.27% +0.02%
==========================================
Files 38 38
Lines 17114 17121 +7
==========================================
+ Hits 15617 15627 +10
+ Misses 1497 1494 -3
📣 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.
FWIW all these impl
docs are nice to have, I guess, but I would consider them very low priority.
Agreed 😄 |
A large but simple PR.
I made sure all
Add
/Sub
documentation onNaiveDate
,NaiveTime
,NaiveDateTime
andDateTime
follows the same format and mentions panics.The implementations now use
expect
instead of unwrap.And I changed
impl Add<std::time::Duration> for NaiveTime
andSub
to take a modulus of the duration before converting to remove a panic case.Fixes #1302, #1314.