mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
migrate ra_ide_api to the new rowan
This commit is contained in:
parent
0343c4a815
commit
f1abc7bdc6
29 changed files with 342 additions and 290 deletions
|
@ -104,7 +104,7 @@ impl FromIterator<TableEntry<MacroFile, Option<Parse<SyntaxNode>>>> for SyntaxTr
|
|||
let mut res = SyntaxTreeStats::default();
|
||||
for entry in iter {
|
||||
res.total += 1;
|
||||
if let Some(tree) = entry.value.and_then(|it| it).map(|it| it.tree().to_owned()) {
|
||||
if let Some(tree) = entry.value.and_then(|it| it).map(|it| it.syntax_node()) {
|
||||
res.retained += 1;
|
||||
res.retained_size += tree.memory_size_of_subtree();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue