Skip to content

Commit

Permalink
avoid clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Wójcik committed Apr 18, 2024
1 parent 7eda53e commit 2663f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ pub async fn setup_interface_tunnel(
.expect("Failed to parse persistent keep alive"),
);

if let Some(psk) = tunnel.preshared_key.clone() {
let peer_psk = Key::from_str(&psk)?;
if let Some(psk) = &tunnel.preshared_key {
let peer_psk = Key::from_str(psk)?;
peer.preshared_key = Some(peer_psk);
}

Expand Down

0 comments on commit 2663f84

Please sign in to comment.