diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-20 17:54:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-20 17:54:57 +0100 |
commit | 21b4e9178fd7047f01f6d999abe6b167027263d9 (patch) | |
tree | 0fac8c81fa4940e946f6f7f1efe2af2383207b0b /crates/ra_ide/src/completion | |
parent | 7a089a7bab3779ad83719a91f0db6ec6ccf0175b (diff) | |
parent | 17f4d27f1285a76961b2e3957dc192de8e4f179f (diff) |
Merge #5440
5440: Minor perf tweaks per clippy r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index 9e82d6854..c84d43d77 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs | |||
@@ -215,7 +215,7 @@ impl<'a> CompletionContext<'a> { | |||
215 | 215 | ||
216 | fn fill_keyword_patterns(&mut self, file_with_fake_ident: &SyntaxNode, offset: TextSize) { | 216 | fn fill_keyword_patterns(&mut self, file_with_fake_ident: &SyntaxNode, offset: TextSize) { |
217 | let fake_ident_token = file_with_fake_ident.token_at_offset(offset).right_biased().unwrap(); | 217 | let fake_ident_token = file_with_fake_ident.token_at_offset(offset).right_biased().unwrap(); |
218 | let syntax_element = NodeOrToken::Token(fake_ident_token.clone()); | 218 | let syntax_element = NodeOrToken::Token(fake_ident_token); |
219 | self.block_expr_parent = has_block_expr_parent(syntax_element.clone()); | 219 | self.block_expr_parent = has_block_expr_parent(syntax_element.clone()); |
220 | self.unsafe_is_prev = unsafe_is_prev(syntax_element.clone()); | 220 | self.unsafe_is_prev = unsafe_is_prev(syntax_element.clone()); |
221 | self.if_is_prev = if_is_prev(syntax_element.clone()); | 221 | self.if_is_prev = if_is_prev(syntax_element.clone()); |
@@ -228,7 +228,7 @@ impl<'a> CompletionContext<'a> { | |||
228 | self.trait_as_prev_sibling = has_trait_as_prev_sibling(syntax_element.clone()); | 228 | self.trait_as_prev_sibling = has_trait_as_prev_sibling(syntax_element.clone()); |
229 | self.is_match_arm = is_match_arm(syntax_element.clone()); | 229 | self.is_match_arm = is_match_arm(syntax_element.clone()); |
230 | self.has_item_list_or_source_file_parent = | 230 | self.has_item_list_or_source_file_parent = |
231 | has_item_list_or_source_file_parent(syntax_element.clone()); | 231 | has_item_list_or_source_file_parent(syntax_element); |
232 | } | 232 | } |
233 | 233 | ||
234 | fn fill( | 234 | fn fill( |