2378: Fix panic in batch analysis r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2019-11-24 09:12:12 +00:00 committed by GitHub
commit ea3124c12a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
}