From 504daeda240a4051a206a36e9940e0c6d9f4024f Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:24:29 +0000 Subject: [PATCH] refactor(allocator): rename fn params for `Box::new_in` (#4431) Rename function params for `Box::new_in` to be more descriptive and match our naming conventions. --- crates/oxc_allocator/src/arena.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_allocator/src/arena.rs b/crates/oxc_allocator/src/arena.rs index 30399a3d3669e..4a5cb06405ae7 100644 --- a/crates/oxc_allocator/src/arena.rs +++ b/crates/oxc_allocator/src/arena.rs @@ -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.