mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
remove unused query
This commit is contained in:
parent
858dd48af2
commit
d095d9273e
2 changed files with 5 additions and 15 deletions
|
@ -171,7 +171,8 @@ impl<N: AstNode> AstId<N> {
|
|||
}
|
||||
|
||||
pub fn to_node(&self, db: &impl AstDatabase) -> N {
|
||||
let syntax_node = db.ast_id_to_node(self.file_id, self.file_ast_id.into());
|
||||
N::cast(syntax_node).unwrap()
|
||||
let root = db.parse_or_expand(self.file_id).unwrap();
|
||||
let node = db.ast_id_map(self.file_id)[self.file_ast_id.into()].to_node(&root);
|
||||
N::cast(node).unwrap()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue