And a few drive-bys

This commit is contained in:
kjeremy 2020-05-22 17:26:31 -04:00
parent d8af45472e
commit 7a46a99490
3 changed files with 4 additions and 6 deletions

View file

@ -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;
}

View file

@ -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() {

View file

@ -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 })
}