mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Grand refactoring
This commit is contained in:
parent
2007ccfcfe
commit
8abf536343
14 changed files with 591 additions and 484 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue