mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
ae97d31c76
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