Use ExpandResult instead of MacroResult

`MacroResult` is redundant
This commit is contained in:
Jonas Schievink 2020-11-26 16:48:17 +01:00
parent 1542797284
commit 6a9338e979
5 changed files with 42 additions and 56 deletions

View file

@ -1,6 +1,6 @@
use std::{fmt, iter::FromIterator, sync::Arc};
use hir::{MacroFile, MacroResult};
use hir::{ExpandResult, MacroFile};
use ide_db::base_db::{
salsa::debug::{DebugQueryTable, TableEntry},
CrateId, FileId, FileTextQuery, SourceDatabase, SourceRootId,
@ -115,12 +115,12 @@ impl FromIterator<TableEntry<FileId, Parse<ast::SourceFile>>> for SyntaxTreeStat
}
}
impl<M> FromIterator<TableEntry<MacroFile, MacroResult<(Parse<SyntaxNode>, M)>>>
impl<M> FromIterator<TableEntry<MacroFile, ExpandResult<Option<(Parse<SyntaxNode>, M)>>>>
for SyntaxTreeStats
{
fn from_iter<T>(iter: T) -> SyntaxTreeStats
where
T: IntoIterator<Item = TableEntry<MacroFile, MacroResult<(Parse<SyntaxNode>, M)>>>,
T: IntoIterator<Item = TableEntry<MacroFile, ExpandResult<Option<(Parse<SyntaxNode>, M)>>>>,
{
let mut res = SyntaxTreeStats::default();
for entry in iter {