-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Vec::into_boxed_slice
calls shrink_to_fit
internally.
That method explicitly states in the docs that it may leave some excess capacity, which the current implementation however does not.
I have a PR coming soon that will actually make use of alloc::usable_size
to actually use excess capacity.
But that fails, because into_boxed_slice
calls out to RawVec::into_box
which actually assumes len() == capacity()
and thus leads to segfaults.
Metadata
Metadata
Assignees
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.