mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
And a few drive-bys
This commit is contained in:
parent
d8af45472e
commit
7a46a99490
3 changed files with 4 additions and 6 deletions
|
@ -269,10 +269,8 @@ impl Config {
|
|||
{
|
||||
self.client_caps.hierarchical_symbols = value
|
||||
}
|
||||
if let Some(value) = doc_caps
|
||||
.code_action
|
||||
.as_ref()
|
||||
.and_then(|it| Some(it.code_action_literal_support.is_some()))
|
||||
if let Some(value) =
|
||||
doc_caps.code_action.as_ref().map(|it| it.code_action_literal_support.is_some())
|
||||
{
|
||||
self.client_caps.code_action_literals = value;
|
||||
}
|
||||
|
|
|
@ -281,7 +281,7 @@ pub fn handle_document_symbol(
|
|||
kind: symbol.kind,
|
||||
deprecated: symbol.deprecated,
|
||||
location: Location::new(url.clone(), symbol.range),
|
||||
container_name: container_name,
|
||||
container_name,
|
||||
});
|
||||
|
||||
for child in symbol.children.iter().flatten() {
|
||||
|
|
|
@ -455,7 +455,7 @@ pub(crate) fn snippet_text_document_edit(
|
|||
let edits = source_file_edit
|
||||
.edit
|
||||
.into_iter()
|
||||
.map(|it| snippet_text_edit(&line_index, line_endings, is_snippet, it.clone()))
|
||||
.map(|it| snippet_text_edit(&line_index, line_endings, is_snippet, it))
|
||||
.collect();
|
||||
Ok(lsp_ext::SnippetTextDocumentEdit { text_document, edits })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue