-
Notifications
You must be signed in to change notification settings - Fork 533
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
0.5: Convert API to return Result
: Datelike::with_year
#1466
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 0.5.x #1466 +/- ##
==========================================
- Coverage 94.04% 94.03% -0.01%
==========================================
Files 37 37
Lines 17022 17005 -17
==========================================
- Hits 16008 15991 -17
Misses 1014 1014 ☔ View full report in Codecov by Sentry. |
@Zomtir Thank you! From #1444 (comment)
From #1444 (comment)
Repeated in #1445 (comment). From #1445 (comment)
And in #1445 (comment)
|
@pitdicker I have neither issue with the pull request idling until it gets useful and/or rebasing it once changes are made. Don't worry. I am looking into |
With #1490 these methods are no longer part of a trait and can be adjusted one type at a time. |
I rebased the changes onto the the current 0.5.x. Now only
CC @pitdicker |
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.
A couple of comments. I think it is mostly caused by the rebase?
f204de1
to
0c97bfe
Compare
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.
Very nice!
Follow up commit for #1444. Split from #1445.
Datelike::with_year
to returnResult<T,E>
NaiveDate::with_year
andNaiveDateTime::with_year
to returnResult<T,E>
DateTime<Tz>::with_year
to returnResult<T,E>
as wellDateTime<Tz>::map_local_result
as transitionary helper function to prevent dependency onDateTime<Tz>::map_local
LocalResult<T>::map_result_unique
to have a transitionary, centralized mapping function until 0.5.x: Timezone conversion result (LocalResult
) #1448 is settledThe function
map_result_unique
is NOT meant to outline future behaviour in any form. The idea is that there is some centralized mapping to aResult
that can easily tracked for the purpose of #1448. Local (non-central) mappings will be prone to spread inconsistent behaviour.However the future of
LocalResult
looks like, it will be easy to track the current usage and adapt the implementation and documentation by searching for themap_result_unique
usage. For that reason I did not document the behaviour ofmap_result_unique
anywhere else than insrc/offset/mod.rs
, but referenced it instead.cc @pitdicker