Skip to content

Commit 2dd997a

Browse files
committed
refactor(allocator): remove dead code from Vec
1 parent 7b1f4a5 commit 2dd997a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

crates/oxc_allocator/src/vec2/raw_vec.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use core::cmp;
2828
use core::mem;
2929
use core::ptr::{self, NonNull};
3030

31-
use allocator_api2::alloc::AllocError;
3231
use bumpalo::collections::CollectionAllocErr::{self, AllocErr, CapacityOverflow};
3332

3433
use crate::alloc::Alloc;
@@ -791,13 +790,6 @@ fn capacity_overflow() -> ! {
791790
panic!("capacity overflow")
792791
}
793792

794-
// Copied from https://github.com/fitzgen/bumpalo/blob/1d2fbea9e3d0c2be56367b9ad5382ff33852a188/src/lib.rs#L482-L486
795-
/// Wrapper around `Layout::from_size_align` that adds debug assertions.
796-
#[inline]
797-
fn layout_from_size_align(size: usize, align: usize) -> Result<Layout, AllocError> {
798-
Layout::from_size_align(size, align).map_err(|_| AllocError)
799-
}
800-
801793
/// Handle collection allocation errors
802794
///
803795
// Causing a collection alloc error is rare case, so marked as `#[cold]` and `#[inline(never)]`

0 commit comments

Comments
 (0)