Skip to content

Commit

Permalink
refactor(allocator): rename fn params for Box::new_in (#4431)
Browse files Browse the repository at this point in the history
Rename function params for `Box::new_in` to be more descriptive and match our naming conventions.
  • Loading branch information
overlookmotel committed Jul 23, 2024
1 parent 9e30175 commit 504daed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_allocator/src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ impl<'alloc, T> Box<'alloc, T> {
}

impl<'alloc, T> Box<'alloc, T> {
pub fn new_in(x: T, alloc: &Allocator) -> Self {
Self(alloc.alloc(x).into(), PhantomData)
pub fn new_in(value: T, allocator: &Allocator) -> Self {
Self(allocator.alloc(value).into(), PhantomData)
}

/// Create a fake `Box` with a dangling pointer.
Expand Down

0 comments on commit 504daed

Please sign in to comment.