-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix obvious and straightforward warnings #4323
Conversation
bf5a1d6
to
369860c
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.
Thanks for chipping away at this! Just a couple questions but LGTM.
369860c
to
dfd2d70
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.
A couple of more comments.
dfd2d70
to
8ffbef1
Compare
case (Ior.Left(a), Ior.Left(aa)) => AA.eqv(a, aa) | ||
case (Ior.Right(b), Ior.Right(bb)) => BB.eqv(b, bb) | ||
case (Ior.Both(a, b), Ior.Both(aa, bb)) => AA.eqv(a, aa) && BB.eqv(b, bb) | ||
case _ => false |
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.
If we are going to discourage using case _
then should I change it to case (_, _) =>
or something?
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.
uh oh, here we have 3! cases to match. probably a wildcard case is a trade-off here. (_, _)
is fine with me.
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.
I think the wildcard should be fine here – since we construct the tuple in-place then it won't cause any additional value uncertainty like null values or something...
856e447
to
275a9eb
Compare
Although it was decided to postpone Cats codebase cleanup for a while until the Scalac options set gets settled completely, some compiler warnings are so obvious and easy-to-fix that I couldn't refrain from fixing them up. Apparently, it is not a complete solution but rather some small relief.
Can be considered as a prelude for #4187 series.
UPD. Turned out, there are also quite a bit of small code optimizations included.