From 132db7d2a177bad12354676010e584d9b3d08145 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 11 May 2024 05:17:05 +0100 Subject: [PATCH] refactor(traverse): do not expose `TraverseCtx::new` (#3226) Creating a `TraverseCtx` with `TraverseCtx::new` should be an internal API within `oxc_traverse`. Don't expose it outside the crate. --- crates/oxc_traverse/src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_traverse/src/context.rs b/crates/oxc_traverse/src/context.rs index eed575f4c..2bb2d7223 100644 --- a/crates/oxc_traverse/src/context.rs +++ b/crates/oxc_traverse/src/context.rs @@ -34,7 +34,7 @@ pub enum FinderRet { // Public methods impl<'a> TraverseCtx<'a> { /// Create new traversal context. - pub fn new(allocator: &'a Allocator) -> Self { + pub(crate) fn new(allocator: &'a Allocator) -> Self { let mut stack = Vec::with_capacity(INITIAL_STACK_CAPACITY); stack.push(Ancestor::None); Self { stack, ast: AstBuilder::new(allocator) }