Skip to content

Commit

Permalink
refactor(traverse): apply clippy::redundant_pub_crate (oxc-project#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Feb 20, 2025
1 parent 358320d commit 9c3549d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ empty_structs_with_brackets = "warn"
exit = "warn"
filetype_is_file = "warn"
get_unwrap = "warn"
impl_trait_in_params = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
Expand Down Expand Up @@ -81,13 +80,13 @@ significant_drop_tightening = "allow"
branches_sharing_code = "allow"
fallible_impl_from = "allow"
useless_let_if_seq = "allow"
impl_trait_in_params = "allow"
significant_drop_in_scrutinee = "warn"
iter_on_single_items = "warn"
unused_peekable = "warn"
too_long_first_doc_paragraph = "warn"
suspicious_operation_groupings = "warn"
redundant_clone = "warn"
redundant_pub_crate = "allow" # FIXME
# cargo
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_semantic/src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl Default for ScopeTree {
}

self_cell::self_cell!(
pub(crate) struct ScopeTreeCell {
pub struct ScopeTreeCell {
owner: Allocator,
#[covariant]
dependent: ScopeTreeInner,
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/scripts/lib/scopes_collector.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function generateScopesCollectorCode(types) {
/// Visitor that locates all child scopes.
/// NB: Child scopes only, not grandchild scopes.
/// Does not do full traversal - stops each time it hits a node with a scope.
pub(crate) struct ChildScopeCollector {
pub struct ChildScopeCollector {
pub(crate) scope_ids: Vec<ScopeId>,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/scripts/lib/walk.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function generateWalkFunctionsCode(types) {
/// (\`Program<'a>\`).
/// * \`ctx\` must contain a \`TraverseAncestry<'a>\` with single \`Ancestor::None\` on its stack.
#[inline]
pub(crate) unsafe fn walk_ast<'a, Tr: Traverse<'a>>(
pub unsafe fn walk_ast<'a, Tr: Traverse<'a>>(
traverser: &mut Tr,
program: *mut Program<'a>,
ctx: &mut TraverseCtx<'a>,
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/src/generated/scopes_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use oxc_syntax::scope::{ScopeFlags, ScopeId};
/// Visitor that locates all child scopes.
/// NB: Child scopes only, not grandchild scopes.
/// Does not do full traversal - stops each time it hits a node with a scope.
pub(crate) struct ChildScopeCollector {
pub struct ChildScopeCollector {
pub(crate) scope_ids: Vec<ScopeId>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_traverse/src/generated/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
/// (`Program<'a>`).
/// * `ctx` must contain a `TraverseAncestry<'a>` with single `Ancestor::None` on its stack.
#[inline]
pub(crate) unsafe fn walk_ast<'a, Tr: Traverse<'a>>(
pub unsafe fn walk_ast<'a, Tr: Traverse<'a>>(
traverser: &mut Tr,
program: *mut Program<'a>,
ctx: &mut TraverseCtx<'a>,
Expand Down

0 comments on commit 9c3549d

Please sign in to comment.