mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
make Parse generic
This commit is contained in:
parent
abe72424a6
commit
a6224f3620
5 changed files with 44 additions and 23 deletions
|
@ -9,7 +9,7 @@ use ra_db::{
|
|||
FileTextQuery, SourceRootId,
|
||||
};
|
||||
use ra_prof::{memory_usage, Bytes};
|
||||
use ra_syntax::{AstNode, Parse, SyntaxNode, TreeArc};
|
||||
use ra_syntax::{ast, AstNode, Parse, SyntaxNode, TreeArc};
|
||||
|
||||
use crate::{
|
||||
db::RootDatabase,
|
||||
|
@ -79,10 +79,10 @@ impl fmt::Display for SyntaxTreeStats {
|
|||
}
|
||||
}
|
||||
|
||||
impl FromIterator<TableEntry<FileId, Parse>> for SyntaxTreeStats {
|
||||
impl FromIterator<TableEntry<FileId, Parse<ast::SourceFile>>> for SyntaxTreeStats {
|
||||
fn from_iter<T>(iter: T) -> SyntaxTreeStats
|
||||
where
|
||||
T: IntoIterator<Item = TableEntry<FileId, Parse>>,
|
||||
T: IntoIterator<Item = TableEntry<FileId, Parse<ast::SourceFile>>>,
|
||||
{
|
||||
let mut res = SyntaxTreeStats::default();
|
||||
for entry in iter {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue