Skip to content

Commit

Permalink
Remove redundant clones
Browse files Browse the repository at this point in the history
  • Loading branch information
linuskendall committed Dec 12, 2023
1 parent d451bb8 commit 8af64d4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shared/src/prompts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down

0 comments on commit 8af64d4

Please sign in to comment.