aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-24 09:06:00 +0000
committerAleksey Kladov <[email protected]>2019-11-24 09:06:00 +0000
commit730664f646aae36836c36c0cfdad382e0b1407f1 (patch)
treefaf9d7dd4955d248355e84a8d9d0d3b0276e31b0 /crates
parent1aded342266f18b519666ac512e77b0c211fff5d (diff)
Fix panic in batch analysis
Closes #2272
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_batch/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs
index df49eb13d..cb389eb26 100644
--- a/crates/ra_batch/src/lib.rs
+++ b/crates/ra_batch/src/lib.rs
@@ -117,9 +117,12 @@ pub fn load(
117 done = true; 117 done = true;
118 } 118 }
119 } 119 }
120 VfsChange::AddFile { .. } 120 VfsChange::AddFile { root, file, path, text } => {
121 | VfsChange::RemoveFile { .. } 121 let source_root_id = vfs_root_to_id(root);
122 | VfsChange::ChangeFile { .. } => { 122 let file_id = vfs_file_to_id(file);
123 analysis_change.add_file(source_root_id, file_id, path, text);
124 }
125 VfsChange::RemoveFile { .. } | VfsChange::ChangeFile { .. } => {
123 // We just need the first scan, so just ignore these 126 // We just need the first scan, so just ignore these
124 } 127 }
125 } 128 }