Reduce visibility

This commit is contained in:
Aleksey Kladov 2020-07-23 15:07:01 +02:00
parent 85532e2df3
commit 28adb8fe16

View File

@ -262,14 +262,14 @@ pub enum MacroCallKind {
}
impl MacroCallKind {
pub fn file_id(&self) -> HirFileId {
fn file_id(&self) -> HirFileId {
match self {
MacroCallKind::FnLike(ast_id) => ast_id.file_id,
MacroCallKind::Attr(ast_id, _) => ast_id.file_id,
}
}
pub fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> {
fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> {
match self {
MacroCallKind::FnLike(ast_id) => ast_id.with_value(ast_id.to_node(db).syntax().clone()),
MacroCallKind::Attr(ast_id, _) => {
@ -278,7 +278,7 @@ pub fn node(&self, db: &dyn db::AstDatabase) -> InFile<SyntaxNode> {
}
}
pub fn arg(&self, db: &dyn db::AstDatabase) -> Option<SyntaxNode> {
fn arg(&self, db: &dyn db::AstDatabase) -> Option<SyntaxNode> {
match self {
MacroCallKind::FnLike(ast_id) => {
Some(ast_id.to_node(db).token_tree()?.syntax().clone())