about summary refs log tree commit diff
path: root/tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-08-22 16:55:42 +0000
committerGitHub <noreply@github.com>2025-08-22 16:55:42 +0000
commitae97d31c76155f34a89f72cc2e46bd2f62ecbd2f (patch)
tree280e43c8734c9b923e1286fe1d1578a1f331f54d /tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs
parent12a4f4d27b55bcf5b22f29225ea3c86421b22008 (diff)
parentebbea345726e04cd26b69b8334169ba0571b2d34 (diff)
downloadrust-ae97d31c76155f34a89f72cc2e46bd2f62ecbd2f.tar.gz
rust-ae97d31c76155f34a89f72cc2e46bd2f62ecbd2f.zip
`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
Diffstat (limited to 'tests/codegen-llvm/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions