This commit is contained in:
Aleksey Kladov 2018-11-27 18:45:16 +03:00
parent f4860870da
commit aa7fd563a4
4 changed files with 13 additions and 22 deletions

View file

@ -38,10 +38,7 @@ pub(crate) fn completions(
original_file.reparse(&edit)
};
let module = match ModuleDescriptor::guess_from_position(db, position)? {
None => return Ok(None),
Some(it) => it,
};
let module = ctry!(ModuleDescriptor::guess_from_position(db, position)?);
let mut res = Vec::new();
let mut has_completions = false;