diff options
author | bors <bors@rust-lang.org> | 2022-11-27 00:58:50 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-11-27 00:58:50 +0000 |
commit | faf1891deb2633fe4040de8b71fd7b2045c45dc5 (patch) | |
tree | baf896d46501fa2b94a56210391db2523a791748 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs | |
parent | c0e9c86b3f3e96267ba2cd80f95f362ef0cce40b (diff) | |
parent | 9d68a1a74c65245c9ae7b5db2c552c995697e8ef (diff) | |
download | rust-faf1891deb2633fe4040de8b71fd7b2045c45dc5.tar.gz |
Auto merge of #104818 - scottmcm:refactor-extend-func, r=the8472
Stop peeling the last iteration of the loop in `Vec::resize_with`
`resize_with` uses the `ExtendWith` code that peels the last iteration:
https://github.com/rust-lang/rust/blob/341d8b8a2c290b4535e965867e876b095461ff6e/library/alloc/src/vec/mod.rs#L2525-L2529
But that's kinda weird for `ExtendFunc` because it does the same thing on the last iteration anyway:
https://github.com/rust-lang/rust/blob/341d8b8a2c290b4535e965867e876b095461ff6e/library/alloc/src/vec/mod.rs#L2494-L2502
So this just has it use the normal `extend`-from-`TrustedLen` code instead.
r? `@ghost`
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions