remove AnalysisHostImpl

This commit is contained in:
Aleksey Kladov 2019-01-02 18:41:41 +03:00
parent 2f22c861a9
commit e9b47dbb36
2 changed files with 26 additions and 45 deletions

View file

@ -29,7 +29,7 @@ use rayon::prelude::*;
use relative_path::RelativePathBuf;
use crate::{
imp::{AnalysisHostImpl, AnalysisImpl},
imp::AnalysisImpl,
symbol_index::{SymbolIndex, FileSymbol},
};
@ -153,7 +153,7 @@ impl AnalysisChange {
/// `AnalysisHost` stores the current state of the world.
#[derive(Debug, Default)]
pub struct AnalysisHost {
imp: AnalysisHostImpl,
db: db::RootDatabase,
}
impl AnalysisHost {
@ -161,13 +161,13 @@ impl AnalysisHost {
/// semantic information.
pub fn analysis(&self) -> Analysis {
Analysis {
imp: self.imp.analysis(),
imp: self.db.analysis(),
}
}
/// Applies changes to the current state of the world. If there are
/// outstanding snapshots, they will be canceled.
pub fn apply_change(&mut self, change: AnalysisChange) {
self.imp.apply_change(change)
self.db.apply_change(change)
}
}