4 ms·
If you look at the source for into_boxed_slice, it calls shrink_to_fit at the beginning before doing anything else. Hence the documentation is slightly wrong, a
by invpt 3y ago
If you look at the source for into_boxed_slice, it calls shrink_to_fit at the beginning before doing anything else. Hence the documentation is slightly wrong, and no copies occur.
Edit: I submitted a PR to clear up the docs: https://github.com/rust-lang/rust/pull/120110 https://github.com/rust-lang/rust/pull/120110
- cmrx64 3y agothank you!