mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-02 14:07:10 +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.