Grand refactoring

This commit is contained in:
Aleksey Kladov 2018-08-29 18:03:14 +03:00
parent 2007ccfcfe
commit 8abf536343
14 changed files with 591 additions and 484 deletions

View file

@ -5,7 +5,7 @@ use std::{
};
use languageserver_types::Url;
use libanalysis::{FileId, WorldState, World};
use libanalysis::{FileId, WorldState, Analysis};
use {
Result,
@ -22,7 +22,7 @@ pub struct ServerWorldState {
#[derive(Clone)]
pub struct ServerWorld {
pub analysis: World,
pub analysis: Analysis,
pub path_map: PathMap,
}
@ -91,14 +91,14 @@ impl ServerWorldState {
pub fn snapshot(&self) -> ServerWorld {
ServerWorld {
analysis: self.analysis.snapshot(self.path_map.clone()),
analysis: self.analysis.analysis(self.path_map.clone()),
path_map: self.path_map.clone()
}
}
}
impl ServerWorld {
pub fn analysis(&self) -> &World {
pub fn analysis(&self) -> &Analysis {
&self.analysis
}