aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/global_state.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-10-02 14:45:09 +0100
committerAleksey Kladov <[email protected]>2020-10-02 15:45:08 +0100
commit8716c4cec3a05ba891b20b5f28df69d925b913ad (patch)
treee2f073c459e9a1e1c98b98d524565633524b84c2 /crates/rust-analyzer/src/global_state.rs
parent700c9bc019346a321d230c51bbea597a497bed84 (diff)
Move ide::AnalysisChange -> base_db::Change
This seems like a better factoring logically; ideally, clients shouldn't touch `set_` methods of the database directly. Additionally, I think this should remove the unfortunate duplication in fixture code.
Diffstat (limited to 'crates/rust-analyzer/src/global_state.rs')
-rw-r--r--crates/rust-analyzer/src/global_state.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs
index 96313aaec..dafab6a6a 100644
--- a/crates/rust-analyzer/src/global_state.rs
+++ b/crates/rust-analyzer/src/global_state.rs
@@ -8,7 +8,7 @@ use std::{sync::Arc, time::Instant};
8use base_db::{CrateId, VfsPath}; 8use base_db::{CrateId, VfsPath};
9use crossbeam_channel::{unbounded, Receiver, Sender}; 9use crossbeam_channel::{unbounded, Receiver, Sender};
10use flycheck::FlycheckHandle; 10use flycheck::FlycheckHandle;
11use ide::{Analysis, AnalysisChange, AnalysisHost, FileId}; 11use ide::{Analysis, AnalysisHost, Change, FileId};
12use lsp_types::{SemanticTokens, Url}; 12use lsp_types::{SemanticTokens, Url};
13use parking_lot::{Mutex, RwLock}; 13use parking_lot::{Mutex, RwLock};
14use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target}; 14use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
@@ -139,7 +139,7 @@ impl GlobalState {
139 let mut has_fs_changes = false; 139 let mut has_fs_changes = false;
140 140
141 let change = { 141 let change = {
142 let mut change = AnalysisChange::new(); 142 let mut change = Change::new();
143 let (vfs, line_endings_map) = &mut *self.vfs.write(); 143 let (vfs, line_endings_map) = &mut *self.vfs.write();
144 let changed_files = vfs.take_changes(); 144 let changed_files = vfs.take_changes();
145 if changed_files.is_empty() { 145 if changed_files.is_empty() {