Fix safety section of `RawVec::into_box`

This commit is contained in:
Tim Diekmann 2020-03-25 19:12:06 +01:00
parent cbbdca0594
commit fed3d6e646
1 changed files with 2 additions and 1 deletions

View File

@ -574,7 +574,8 @@ impl<T> RawVec<T, Global> {
///
/// # Safety
///
/// * `len` must be smaller than or equal to `self.capacity()`
/// `shrink_to_fit(len)` must be called immediately prior to calling this function. This
/// implies, that `len` must be smaller than or equal to `self.capacity()`.
pub unsafe fn into_box(self, len: usize) -> Box<[MaybeUninit<T>]> {
debug_assert!(
len <= self.capacity(),