Fix obvious and straightforward warnings#4323
Merged
Merged
Conversation
satorg
force-pushed
the
fix-simple-warnings
branch
from
October 18, 2022 07:12
bf5a1d6 to
369860c
Compare
satorg
commented
Oct 18, 2022
armanbilge
reviewed
Oct 18, 2022
armanbilge
left a comment
Member
There was a problem hiding this comment.
Thanks for chipping away at this! Just a couple questions but LGTM.
johnynek
reviewed
Oct 18, 2022
satorg
force-pushed
the
fix-simple-warnings
branch
from
October 19, 2022 07:16
369860c to
dfd2d70
Compare
johnynek
reviewed
Oct 19, 2022
johnynek
left a comment
Contributor
There was a problem hiding this comment.
A couple of more comments.
satorg
force-pushed
the
fix-simple-warnings
branch
from
October 19, 2022 07:54
dfd2d70 to
8ffbef1
Compare
danicheg
reviewed
Oct 19, 2022
satorg
commented
Oct 20, 2022
satorg
commented
Oct 20, 2022
| 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 |
Contributor
Author
There was a problem hiding this comment.
If we are going to discourage using case _ then should I change it to case (_, _) => or something?
Member
There was a problem hiding this comment.
uh oh, here we have 3! cases to match. probably a wildcard case is a trade-off here. (_, _) is fine with me.
Contributor
Author
There was a problem hiding this comment.
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...
satorg
force-pushed
the
fix-simple-warnings
branch
from
October 21, 2022 05:30
856e447 to
275a9eb
Compare
armanbilge
approved these changes
Oct 27, 2022
johnynek
approved these changes
Oct 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.