Skip to content

Commit ccb1fce

Browse files
committed
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`
2 parents 9af55b0 + eb4ec2d commit ccb1fce

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)