SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 65 Rust

Explicitly forget the zero remaining elements in `vec::IntoIter::fold()` and `spec_extend()`.

Adds internal `vec::IntoIter::forget_remaining_elements_and_dealloc()`,
which is used by `fold()` and `spec_extend()`, when those operations
complete, to forget the zero remaining elements and only deallocate the
allocation, ensuring that there will never be a useless loop to drop
zero remaining elements when the iterator is dropped.
K
Kevin Reid committed
f700fdc001bd6ccd514b6e6f1a491e832a4b6441
Parent: 67aec36