From 8af64d4a72d5895097d34536b18b6ac6ba94eae8 Mon Sep 17 00:00:00 2001 From: linuskendall Date: Tue, 12 Dec 2023 23:16:09 +0000 Subject: [PATCH] Remove redundant clones --- shared/src/prompts.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/src/prompts.rs b/shared/src/prompts.rs index bc84b8f..42c5c4d 100644 --- a/shared/src/prompts.rs +++ b/shared/src/prompts.rs @@ -411,7 +411,6 @@ pub fn enable_or_disable_peer( .into_iter() .find(|p| &p.name == name) .ok_or_else(|| anyhow!("Peer '{}' does not exist", name))? - .clone() } else { let peer_selection: Vec<_> = enabled_peers .iter() @@ -421,7 +420,7 @@ pub fn enable_or_disable_peer( &format!("Peer to {}able", if enable { "en" } else { "dis" }), &peer_selection, )?; - enabled_peers[index].clone() + enabled_peers[index] }; Ok(