mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
use ctry
This commit is contained in:
parent
f4860870da
commit
aa7fd563a4
4 changed files with 13 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue