mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
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.
This commit is contained in:
parent
700c9bc019
commit
8716c4cec3
11 changed files with 122 additions and 93 deletions
|
@ -8,7 +8,7 @@ use std::{sync::Arc, time::Instant};
|
|||
use base_db::{CrateId, VfsPath};
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
use flycheck::FlycheckHandle;
|
||||
use ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
|
||||
use ide::{Analysis, AnalysisHost, Change, FileId};
|
||||
use lsp_types::{SemanticTokens, Url};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
|
||||
|
@ -139,7 +139,7 @@ impl GlobalState {
|
|||
let mut has_fs_changes = false;
|
||||
|
||||
let change = {
|
||||
let mut change = AnalysisChange::new();
|
||||
let mut change = Change::new();
|
||||
let (vfs, line_endings_map) = &mut *self.vfs.write();
|
||||
let changed_files = vfs.take_changes();
|
||||
if changed_files.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue