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/ide/src/mock_analysis.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/ide/src/mock_analysis.rs')
-rw-r--r-- | crates/ide/src/mock_analysis.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide/src/mock_analysis.rs b/crates/ide/src/mock_analysis.rs index 327cdf91e..6812db9b9 100644 --- a/crates/ide/src/mock_analysis.rs +++ b/crates/ide/src/mock_analysis.rs | |||
@@ -7,9 +7,7 @@ use test_utils::{ | |||
7 | extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER, | 7 | extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{Analysis, AnalysisHost, Change, CrateGraph, Edition, FileId, FilePosition, FileRange}; |
11 | Analysis, AnalysisChange, AnalysisHost, CrateGraph, Edition, FileId, FilePosition, FileRange, | ||
12 | }; | ||
13 | 11 | ||
14 | /// Mock analysis is used in test to bootstrap an AnalysisHost/Analysis | 12 | /// Mock analysis is used in test to bootstrap an AnalysisHost/Analysis |
15 | /// from a set of in-memory files. | 13 | /// from a set of in-memory files. |
@@ -95,7 +93,7 @@ impl MockAnalysis { | |||
95 | } | 93 | } |
96 | pub(crate) fn analysis_host(self) -> AnalysisHost { | 94 | pub(crate) fn analysis_host(self) -> AnalysisHost { |
97 | let mut host = AnalysisHost::default(); | 95 | let mut host = AnalysisHost::default(); |
98 | let mut change = AnalysisChange::new(); | 96 | let mut change = Change::new(); |
99 | let mut file_set = FileSet::default(); | 97 | let mut file_set = FileSet::default(); |
100 | let mut crate_graph = CrateGraph::default(); | 98 | let mut crate_graph = CrateGraph::default(); |
101 | let mut root_crate = None; | 99 | let mut root_crate = None; |