diff options
Diffstat (limited to 'crates/ra_ide_api/src/status.rs')
-rw-r--r-- | crates/ra_ide_api/src/status.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/status.rs b/crates/ra_ide_api/src/status.rs index d99a4e750..821106fea 100644 --- a/crates/ra_ide_api/src/status.rs +++ b/crates/ra_ide_api/src/status.rs | |||
@@ -4,7 +4,7 @@ use std::{ | |||
4 | sync::Arc, | 4 | sync::Arc, |
5 | }; | 5 | }; |
6 | 6 | ||
7 | use ra_syntax::{AstNode, TreeArc, SourceFile}; | 7 | use ra_syntax::{AstNode, Parse}; |
8 | use ra_db::{ | 8 | use ra_db::{ |
9 | ParseQuery, FileTextQuery, SourceRootId, | 9 | ParseQuery, FileTextQuery, SourceRootId, |
10 | salsa::{Database, debug::{DebugQueryTable, TableEntry}}, | 10 | salsa::{Database, debug::{DebugQueryTable, TableEntry}}, |
@@ -72,17 +72,17 @@ impl fmt::Display for SyntaxTreeStats { | |||
72 | } | 72 | } |
73 | } | 73 | } |
74 | 74 | ||
75 | impl FromIterator<TableEntry<FileId, TreeArc<SourceFile>>> for SyntaxTreeStats { | 75 | impl FromIterator<TableEntry<FileId, Parse>> for SyntaxTreeStats { |
76 | fn from_iter<T>(iter: T) -> SyntaxTreeStats | 76 | fn from_iter<T>(iter: T) -> SyntaxTreeStats |
77 | where | 77 | where |
78 | T: IntoIterator<Item = TableEntry<FileId, TreeArc<SourceFile>>>, | 78 | T: IntoIterator<Item = TableEntry<FileId, Parse>>, |
79 | { | 79 | { |
80 | let mut res = SyntaxTreeStats::default(); | 80 | let mut res = SyntaxTreeStats::default(); |
81 | for entry in iter { | 81 | for entry in iter { |
82 | res.total += 1; | 82 | res.total += 1; |
83 | if let Some(value) = entry.value { | 83 | if let Some(value) = entry.value { |
84 | res.retained += 1; | 84 | res.retained += 1; |
85 | res.retained_size += value.syntax().memory_size_of_subtree(); | 85 | res.retained_size += value.tree.syntax().memory_size_of_subtree(); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | res | 88 | res |