mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Simplify
This commit is contained in:
parent
06b0cbf607
commit
3956a5b757
9 changed files with 91 additions and 51 deletions
|
@ -201,7 +201,7 @@ pub(crate) fn check_pattern_is_not_applicable(code: &str, check: fn(SyntaxElemen
|
|||
|
||||
pub(crate) fn get_all_items(config: CompletionConfig, code: &str) -> Vec<CompletionItem> {
|
||||
let (db, position) = position(code);
|
||||
crate::completions(&db, &config, position).unwrap().into()
|
||||
crate::completions(&db, &config, position).map_or_else(Vec::default, Into::into)
|
||||
}
|
||||
|
||||
fn check_no_completion(ra_fixture: &str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue