diff options
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/completion/completion_context.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide/src/diagnostics.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 2 |
3 files changed, 4 insertions, 4 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( |
diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index fe75f4b2c..e029af0dc 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs | |||
@@ -183,7 +183,7 @@ fn missing_struct_field_fix( | |||
183 | } | 183 | } |
184 | new_field = format!("\n{}{}", indent, new_field); | 184 | new_field = format!("\n{}{}", indent, new_field); |
185 | 185 | ||
186 | let needs_comma = !last_field_syntax.to_string().ends_with(","); | 186 | let needs_comma = !last_field_syntax.to_string().ends_with(','); |
187 | if needs_comma { | 187 | if needs_comma { |
188 | new_field = format!(",{}", new_field); | 188 | new_field = format!(",{}", new_field); |
189 | } | 189 | } |
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 43a5e29b5..09883ab4d 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs | |||
@@ -171,7 +171,7 @@ fn get_param_name_hints( | |||
171 | .map(|(param_name, arg)| InlayHint { | 171 | .map(|(param_name, arg)| InlayHint { |
172 | range: arg.syntax().text_range(), | 172 | range: arg.syntax().text_range(), |
173 | kind: InlayKind::ParameterHint, | 173 | kind: InlayKind::ParameterHint, |
174 | label: param_name.to_string().into(), | 174 | label: param_name.into(), |
175 | }); | 175 | }); |
176 | 176 | ||
177 | acc.extend(hints); | 177 | acc.extend(hints); |