diff options
author | Jeremy Kolb <[email protected]> | 2020-05-25 18:35:52 +0100 |
---|---|---|
committer | Jeremy Kolb <[email protected]> | 2020-05-25 18:35:52 +0100 |
commit | a5cc9a8a9ba1e6a0fc281e149881abdd3bd075c1 (patch) | |
tree | 8235c222a226ace40dc487c8d36a0fdfe6e40c3b /crates/ra_ide/src | |
parent | 3c2c8d7e5f7887351bf8e475f441609527679e5f (diff) |
Fix some clippy perf warnings
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/ssr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/ssr.rs b/crates/ra_ide/src/ssr.rs index 1873d1d0d..130d3b4c3 100644 --- a/crates/ra_ide/src/ssr.rs +++ b/crates/ra_ide/src/ssr.rs | |||
@@ -196,10 +196,10 @@ fn find(pattern: &SsrPattern, code: &SyntaxNode) -> SsrMatches { | |||
196 | ) -> Option<Match> { | 196 | ) -> Option<Match> { |
197 | let match_ = check_opt_nodes(pattern.path(), code.path(), placeholders, match_)?; | 197 | let match_ = check_opt_nodes(pattern.path(), code.path(), placeholders, match_)?; |
198 | 198 | ||
199 | let mut pattern_fields = | 199 | let mut pattern_fields: Vec<RecordField> = |
200 | pattern.record_field_list().map(|x| x.fields().collect()).unwrap_or(vec![]); | 200 | pattern.record_field_list().map(|x| x.fields().collect()).unwrap_or_default(); |
201 | let mut code_fields = | 201 | let mut code_fields: Vec<RecordField> = |
202 | code.record_field_list().map(|x| x.fields().collect()).unwrap_or(vec![]); | 202 | code.record_field_list().map(|x| x.fields().collect()).unwrap_or_default(); |
203 | 203 | ||
204 | if pattern_fields.len() != code_fields.len() { | 204 | if pattern_fields.len() != code_fields.len() { |
205 | return None; | 205 | return None; |