Files
rust/clippy_utils/src
Samuel Tardieu ae97d31c76 is_expr_identity_of_pat: simplify using (unordered_)over (#15450)
This makes the last arm significantly shorter, but marginally shortens
the other ones as well

- I first removed the length comparisons from the match guards since
they were already present in `(unordered_)over`, but then brought them
back since they are quite a helpful "guard clause"
- It's a bit unfortunate that the `Slice`/`Array` arm can't use `over`
as well, which creates some asymmetry, but changing the signature of
`over` 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 by `ExactLenIterator::len`,
but that method is still unstable AFAIR)

One other option would be to only use `unordered_over` in the last arm,
and not `over`, but I think `over` is not that bad..

changelog: none
2025-08-22 16:55:42 +00:00
..
2025-08-22 15:03:15 +02:00
2025-07-31 19:56:11 +10:00
2025-08-14 23:17:54 +02:00
2025-08-11 17:05:42 -05:00