Skip to content

Commit

Permalink
restrict publicity
Browse files Browse the repository at this point in the history
  • Loading branch information
FwP-IDN committed Feb 18, 2025
1 parent 20c6e60 commit 6b3cdb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,15 +716,15 @@ mod test {
}
}

pub fn is_absolute_decl_path(path: &ast::Path) -> bool {
pub(crate) fn is_absolute_decl_path(path: &ast::Path) -> bool {
let segments = &path.segments;
match segments.first() {
Some(path_segment) => path_segment.ident.name == symbol::kw::PathRoot,
None => false,
}
}

pub fn is_ty_kind_with_absolute_decl(ty_kind: &ast::TyKind) -> bool {
pub(crate) fn is_ty_kind_with_absolute_decl(ty_kind: &ast::TyKind) -> bool {
match ty_kind {
ast::TyKind::Path(None, ast_path) => is_absolute_decl_path(ast_path),
_ => false,
Expand Down

0 comments on commit 6b3cdb3

Please sign in to comment.