Skip to content

Commit 5b25305

Browse files
i like the syntax
1 parent 1003f82 commit 5b25305

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

crates/pg_completions/src/relevance.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,10 @@ impl<'a> CompletionRelevance<'a> {
9696

9797
fn check_is_invocation(&mut self, ctx: &CompletionContext) {
9898
self.score += match self.data {
99-
CompletionRelevanceData::Function(_) => {
100-
if ctx.is_invocation {
101-
30
102-
} else {
103-
-10
104-
}
105-
}
106-
_ => {
107-
if ctx.is_invocation {
108-
-10
109-
} else {
110-
0
111-
}
112-
}
99+
CompletionRelevanceData::Function(_) if ctx.is_invocation => 30,
100+
CompletionRelevanceData::Function(_) if !ctx.is_invocation => -10,
101+
_ if ctx.is_invocation => -10,
102+
_ => 0,
113103
};
114104
}
115105

0 commit comments

Comments
 (0)