summaryrefslogtreecommitdiff
path: root/crates/typst-ide
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2024-02-28 15:24:50 +0100
committerGitHub <noreply@github.com>2024-02-28 14:24:50 +0000
commit8d63b0479c8b74a756a9e9b34d97f821f280fd22 (patch)
tree30cc34e366948d9ea461a1ad35f80bb5c89e10ab /crates/typst-ide
parent9d8df00ffb587f1e6062ae471d3da3b1ac61ba9e (diff)
Make use of `is_some_and` where applicable (#3523)
Diffstat (limited to 'crates/typst-ide')
-rw-r--r--crates/typst-ide/src/complete.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-ide/src/complete.rs b/crates/typst-ide/src/complete.rs
index 94679552..a05be9f8 100644
--- a/crates/typst-ide/src/complete.rs
+++ b/crates/typst-ide/src/complete.rs
@@ -1178,7 +1178,7 @@ impl<'a> CompletionContext<'a> {
parens: bool,
docs: Option<&str>,
) {
- let at = label.as_deref().map_or(false, |field| !is_ident(field));
+ let at = label.as_deref().is_some_and(|field| !is_ident(field));
let label = label.unwrap_or_else(|| value.repr());
let detail = docs.map(Into::into).or_else(|| match value {