diff options
author | Aleksey Kladov <[email protected]> | 2020-10-02 14:45:09 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-10-02 15:45:08 +0100 |
commit | 8716c4cec3a05ba891b20b5f28df69d925b913ad (patch) | |
tree | e2f073c459e9a1e1c98b98d524565633524b84c2 /crates/rust-analyzer/src/global_state.rs | |
parent | 700c9bc019346a321d230c51bbea597a497bed84 (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.rs | 4 |
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}; | |||
8 | use base_db::{CrateId, VfsPath}; | 8 | use base_db::{CrateId, VfsPath}; |
9 | use crossbeam_channel::{unbounded, Receiver, Sender}; | 9 | use crossbeam_channel::{unbounded, Receiver, Sender}; |
10 | use flycheck::FlycheckHandle; | 10 | use flycheck::FlycheckHandle; |
11 | use ide::{Analysis, AnalysisChange, AnalysisHost, FileId}; | 11 | use ide::{Analysis, AnalysisHost, Change, FileId}; |
12 | use lsp_types::{SemanticTokens, Url}; | 12 | use lsp_types::{SemanticTokens, Url}; |
13 | use parking_lot::{Mutex, RwLock}; | 13 | use parking_lot::{Mutex, RwLock}; |
14 | use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target}; | 14 | use 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() { |