make parent module cancelable

This commit is contained in:
Aleksey Kladov 2018-10-20 21:52:49 +03:00
parent 61518580ed
commit c4b0d3cd56
3 changed files with 16 additions and 6 deletions

View file

@ -238,7 +238,7 @@ pub fn handle_parent_module(
) -> Result<Vec<Location>> {
let file_id = params.try_conv_with(&world)?;
let mut res = Vec::new();
for (file_id, symbol) in world.analysis().parent_module(file_id) {
for (file_id, symbol) in world.analysis().parent_module(file_id)? {
let line_index = world.analysis().file_line_index(file_id);
let location = to_location(file_id, symbol.node_range, &world, &line_index)?;
res.push(location);