Skip to content
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

Convert methods on TimeDelta to return Result #1538

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

pitdicker
Copy link
Collaborator

I kept TimeDelta::{checked_add, checked_sub} like they are, returning an Option. That seems in line with checked_add on integers.

We are now at a point where clean-ups are possible. The last commit gets rid of the expect(ok!(/* ... */)) that developed while parts of the API returned Result and parts returned Option.

Once this PR and #1537 land we can get rid of the ok! and try_opt! macros.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 94.36620% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 93.98%. Comparing base (21ee9b7) to head (bb85a51).

Files Patch % Lines
src/time_delta.rs 96.55% 2 Missing ⚠️
src/lib.rs 66.66% 1 Missing ⚠️
src/naive/datetime/mod.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            0.5.x    #1538      +/-   ##
==========================================
+ Coverage   93.96%   93.98%   +0.02%     
==========================================
  Files          37       37              
  Lines       16662    16656       -6     
==========================================
- Hits        15656    15654       -2     
+ Misses       1006     1002       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pitdicker pitdicker merged commit 08c9792 into chronotope:0.5.x Mar 25, 2024
35 checks passed
@pitdicker pitdicker deleted the convert_timedelta branch March 25, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants