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

remove some casts in AndThen #3518

Merged
merged 1 commit into from
Jul 13, 2020
Merged

remove some casts in AndThen #3518

merged 1 commit into from
Jul 13, 2020

Conversation

johnynek
Copy link
Contributor

@johnynek johnynek commented Jul 12, 2020

before scala 2.12, you could not use tailrec with generics that changed types as the recursion went on. But now, we only support 2.12 and later.

That pattern is used in a few places in cats. This PR removes those casts and shortens the code in AndThen.

It helps see that the code is safe and should be just as fast.

@codecov-commenter
Copy link

Codecov Report

Merging #3518 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3518      +/-   ##
==========================================
- Coverage   91.54%   91.52%   -0.02%     
==========================================
  Files         386      386              
  Lines        8476     8462      -14     
  Branches      245      216      -29     
==========================================
- Hits         7759     7745      -14     
  Misses        717      717              

@johnynek johnynek merged commit f310847 into master Jul 13, 2020
@travisbrown travisbrown added this to the 2.2.0-RC2 milestone Jul 17, 2020
@larsrh larsrh deleted the oscar/remove_andthen_casts branch September 19, 2020 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants