Skip to content

Commit 7a46a99

Browse files
committed
And a few drive-bys
1 parent d8af454 commit 7a46a99

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,8 @@ impl Config {
269269
{
270270
self.client_caps.hierarchical_symbols = value
271271
}
272-
if let Some(value) = doc_caps
273-
.code_action
274-
.as_ref()
275-
.and_then(|it| Some(it.code_action_literal_support.is_some()))
272+
if let Some(value) =
273+
doc_caps.code_action.as_ref().map(|it| it.code_action_literal_support.is_some())
276274
{
277275
self.client_caps.code_action_literals = value;
278276
}

crates/rust-analyzer/src/main_loop/handlers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ pub fn handle_document_symbol(
281281
kind: symbol.kind,
282282
deprecated: symbol.deprecated,
283283
location: Location::new(url.clone(), symbol.range),
284-
container_name: container_name,
284+
container_name,
285285
});
286286

287287
for child in symbol.children.iter().flatten() {

crates/rust-analyzer/src/to_proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ pub(crate) fn snippet_text_document_edit(
455455
let edits = source_file_edit
456456
.edit
457457
.into_iter()
458-
.map(|it| snippet_text_edit(&line_index, line_endings, is_snippet, it.clone()))
458+
.map(|it| snippet_text_edit(&line_index, line_endings, is_snippet, it))
459459
.collect();
460460
Ok(lsp_ext::SnippetTextDocumentEdit { text_document, edits })
461461
}

0 commit comments

Comments
 (0)