mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Fix clippy::or_fun_call
This commit is contained in:
parent
40424d4222
commit
b28ca32db2
12 changed files with 29 additions and 26 deletions
|
@ -10,7 +10,7 @@ pub(super) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
let names = ctx.analyzer.all_names(ctx.db);
|
||||
for (name, res) in names.into_iter() {
|
||||
let r = res.as_ref();
|
||||
let def = match r.take_types().or(r.take_values()) {
|
||||
let def = match r.take_types().or_else(|| r.take_values()) {
|
||||
Some(hir::Resolution::Def(def)) => def,
|
||||
_ => continue,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue