Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions crates/oxc_index/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,11 @@ impl<I: Idx, T> IndexVec<I, T> {
self.raw.pop()
}

/// Converts the vector into an owned IdxSlice, dropping excess capacity.
/// Converts the vector into an owned [`IndexSlice`], dropping excess capacity.
#[inline]
pub fn into_boxed_slice(self) -> alloc::boxed::Box<IndexSlice<I, [T]>> {
pub fn into_boxed_slice(self) -> Box<IndexSlice<I, [T]>> {
let b = self.raw.into_boxed_slice();
// SAFETY: `IndexSlice` is a thin wrapper around `[T]` with the added marker for the index.

unsafe { Box::from_raw(Box::into_raw(b) as *mut IndexSlice<I, [T]>) }
}

Expand Down