is_expr_identity_of_pat
: simplify using (unordered_)over
#15450
+7
−8
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.
This makes the last arm significantly shorter, but marginally shortens the other ones as well
(unordered_)over
, but then brought them back since they are quite a helpful "guard clause"Slice
/Array
arm can't useover
as well, which creates some asymmetry, but changing the signature ofover
to accept arbitrary iterators felt like too much to me, especially because we'd lose the ability to compare the lengths of the two inputs (which could've been mitigated byExactLenIterator::len
, but that method is still unstable AFAIR)One other option would be to only use
unordered_over
in the last arm, and notover
, but I thinkover
is not that bad..changelog: none