aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-24 09:12:12 +0000
committerGitHub <[email protected]>2019-11-24 09:12:12 +0000
commitea3124c12a52f28163a6375b6a5e3c79fc14312d (patch)
treea68762e734f7e2cec718fc292905958ea3238cab /crates
parentcf47ea2877e1ab17dcd0e66de66fe45bcdcda38a (diff)
parent730664f646aae36836c36c0cfdad382e0b1407f1 (diff)
Merge #2378
2378: Fix panic in batch analysis r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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 }