mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-20 05:10:37 +00:00
The unsoundness is not in Peekable per se, it rather is due to the interaction between Peekable being able to hold an extra item and vec::IntoIter's clone implementation shortening the allocation. An alternative solution would be to change IntoIter's clone implementation to keep enough spare capacity available.