From efcc487dffbb2bbd14a030f4509bb2468c6cdf7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 22 Jul 2021 09:03:54 +0300 Subject: [PATCH] Fix a couple of clippy nits --- crates/ide/src/highlight_related.rs | 4 ++-- crates/rust-analyzer/src/handlers.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs index 537d02e12b7..f3c45046b9a 100644 --- a/crates/ide/src/highlight_related.rs +++ b/crates/ide/src/highlight_related.rs @@ -217,8 +217,8 @@ fn highlight_yield_points(token: SyntaxToken) -> Option> { async_token: Option, body: Option, ) -> Option> { - let mut highlights = Vec::new(); - highlights.push(HighlightedRange { access: None, range: async_token?.text_range() }); + let mut highlights = + vec![HighlightedRange { access: None, range: async_token?.text_range() }]; if let Some(body) = body { body.walk(&mut |expr| { if let ast::Expr::AwaitExpr(expr) = expr { diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index af53eb2396f..460721ca73f 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs @@ -769,8 +769,8 @@ pub(crate) fn handle_completion( snap.config.insert_replace_support(), completion_config.enable_imports_on_the_fly, &line_index, - text_document_position.clone(), - items.clone(), + text_document_position, + items, ); let completion_list = lsp_types::CompletionList { is_incomplete: true, items };