-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
Add mapTry to Option #2950
Add mapTry to Option #2950
Conversation
Thanks for your contribution :) looking good!
makes sense - we've migrated to JUnit5 recently, but we're not leveraging it fully
sounds good - could you add it a a separate change, though? so that we don't mix two things together
that's something we might want to straighten out before releasing 1.0.0 |
This reverts commit 89c20aa.
Proposing to migrate to nested classes in #2951 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## version/1.x #2950 +/- ##
==============================================
Coverage ? 92.72%
Complexity ? 5263
==============================================
Files ? 89
Lines ? 12553
Branches ? 1598
==============================================
Hits ? 11640
Misses ? 725
Partials ? 188 ☔ View full report in Codecov by Sentry. |
Add `mapTry` method to Option, which is a shortcut for `.toTry().mapTry`: * when mapping an optional using a checked method, I find it intuitive that the type changes to a Try, and `mapTry` methods exist on other types already * I initially added it onto `Value` but this ran into an issue where a method with same name but return value already exists on subtype`Future` ---- Rebase of #2950
mapTry
method to Option, which is a shortcut for.toTry().mapTry
mapTry
methods exist on other types alreadyValue
but this ran into an issue where a method with same name but return value already exists on subtypeFuture
Unrelated but maybe helpful (I can remove it if desired)
mapTry
tests instead of a commentJUnit
also understands it and can e.g. run only these tests in isolation.