migrate ra_ide_api to the new rowan

This commit is contained in:
Aleksey Kladov 2019-07-19 12:56:47 +03:00
parent 0343c4a815
commit f1abc7bdc6
29 changed files with 342 additions and 290 deletions

View file

@ -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();
}