diff options
Diffstat (limited to 'crates/ide_completion/src/completions/attribute')
-rw-r--r-- | crates/ide_completion/src/completions/attribute/derive.rs | 2 | ||||
-rw-r--r-- | crates/ide_completion/src/completions/attribute/lint.rs | 2 |
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)) |