mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
remove AnalysisHostImpl
This commit is contained in:
parent
2f22c861a9
commit
e9b47dbb36
2 changed files with 26 additions and 45 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue