aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/attribute
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-05-29 13:02:06 +0100
committerLukas Wirth <[email protected]>2021-05-29 13:02:06 +0100
commitc9f0f47bbba3d02a6389af14aaf1c3d1d088d191 (patch)
treec9c05d051033087b008e4058ff212eeadab3d1de /crates/ide_completion/src/completions/attribute
parent411eee76147b0730e1eb5afe84d13558de2ee082 (diff)
simplify
Diffstat (limited to 'crates/ide_completion/src/completions/attribute')
-rw-r--r--crates/ide_completion/src/completions/attribute/derive.rs2
-rw-r--r--crates/ide_completion/src/completions/attribute/lint.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/completions/attribute/derive.rs b/crates/ide_completion/src/completions/attribute/derive.rs
index c213e4792..7b0a778a2 100644
--- a/crates/ide_completion/src/completions/attribute/derive.rs
+++ b/crates/ide_completion/src/completions/attribute/derive.rs
@@ -14,7 +14,7 @@ pub(super) fn complete_derive(
14 ctx: &CompletionContext, 14 ctx: &CompletionContext,
15 derive_input: ast::TokenTree, 15 derive_input: ast::TokenTree,
16) { 16) {
17 if let Ok(existing_derives) = super::parse_comma_sep_input(derive_input) { 17 if let Some(existing_derives) = super::parse_comma_sep_input(derive_input) {
18 for derive_completion in DEFAULT_DERIVE_COMPLETIONS 18 for derive_completion in DEFAULT_DERIVE_COMPLETIONS
19 .iter() 19 .iter()
20 .filter(|completion| !existing_derives.contains(completion.label)) 20 .filter(|completion| !existing_derives.contains(completion.label))
diff --git a/crates/ide_completion/src/completions/attribute/lint.rs b/crates/ide_completion/src/completions/attribute/lint.rs
index 8815e5867..115c6cfe0 100644
--- a/crates/ide_completion/src/completions/attribute/lint.rs
+++ b/crates/ide_completion/src/completions/attribute/lint.rs
@@ -13,7 +13,7 @@ pub(super) fn complete_lint(
13 derive_input: ast::TokenTree, 13 derive_input: ast::TokenTree,
14 lints_completions: &[LintCompletion], 14 lints_completions: &[LintCompletion],
15) { 15) {
16 if let Ok(existing_lints) = super::parse_comma_sep_input(derive_input) { 16 if let Some(existing_lints) = super::parse_comma_sep_input(derive_input) {
17 for lint_completion in lints_completions 17 for lint_completion in lints_completions
18 .into_iter() 18 .into_iter()
19 .filter(|completion| !existing_lints.contains(completion.label)) 19 .filter(|completion| !existing_lints.contains(completion.label))