From 4b2bf9cf66ecfc0bca0d1405ceb0d6eb923b78e2 Mon Sep 17 00:00:00 2001 From: veetaha Date: Tue, 31 Mar 2020 23:21:03 +0300 Subject: Don't clone where you can copy --- crates/rust-analyzer/src/main_loop/subscriptions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/main_loop/subscriptions.rs b/crates/rust-analyzer/src/main_loop/subscriptions.rs index bee6437cf..2c76418be 100644 --- a/crates/rust-analyzer/src/main_loop/subscriptions.rs +++ b/crates/rust-analyzer/src/main_loop/subscriptions.rs @@ -17,6 +17,6 @@ impl Subscriptions { self.subs.remove(&file_id); } pub(crate) fn subscriptions(&self) -> Vec { - self.subs.iter().cloned().collect() + self.subs.iter().copied().collect() } } -- cgit v1.2.3