Fix panic in batch analysis

Closes #2272
This commit is contained in:
Aleksey Kladov 2019-11-24 12:06:00 +03:00
parent 1aded34226
commit 730664f646

View file

@ -117,9 +117,12 @@ pub fn load(
done = true;
}
}
VfsChange::AddFile { .. }
| VfsChange::RemoveFile { .. }
| VfsChange::ChangeFile { .. } => {
VfsChange::AddFile { root, file, path, text } => {
let source_root_id = vfs_root_to_id(root);
let file_id = vfs_file_to_id(file);
analysis_change.add_file(source_root_id, file_id, path, text);
}
VfsChange::RemoveFile { .. } | VfsChange::ChangeFile { .. } => {
// We just need the first scan, so just ignore these
}
}