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.
This commit is contained in:
overlookmotel 2024-05-11 05:17:05 +01:00 committed by GitHub
parent 6ac8a8479e
commit 132db7d2a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ pub enum FinderRet<T> {
// 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) }