From 7812458221e2534da60b8b76bc62a27d486e416e Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 31 Oct 2025 13:43:51 +0100 Subject: [PATCH] Apply feedback --- .../desktop_native/ssh_agent/src/protocol/agent_listener.rs | 2 +- .../desktop/desktop_native/ssh_agent/src/protocol/connection.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/desktop_native/ssh_agent/src/protocol/agent_listener.rs b/apps/desktop/desktop_native/ssh_agent/src/protocol/agent_listener.rs index 28e96d458a0..bb93cfc7bf4 100644 --- a/apps/desktop/desktop_native/ssh_agent/src/protocol/agent_listener.rs +++ b/apps/desktop/desktop_native/ssh_agent/src/protocol/agent_listener.rs @@ -119,7 +119,7 @@ async fn handle_connection( } Request::SessionBind(request) => { span.in_scope(|| info!("Received SessionBind {:?}", request)); - connection.set_host_key(request.host_key().clone()); + connection.set_host_key(request.host_key()); info!( "Bound connection {} to host {:?}", connection.id(), diff --git a/apps/desktop/desktop_native/ssh_agent/src/protocol/connection.rs b/apps/desktop/desktop_native/ssh_agent/src/protocol/connection.rs index a67e3e50a63..5b806868b30 100644 --- a/apps/desktop/desktop_native/ssh_agent/src/protocol/connection.rs +++ b/apps/desktop/desktop_native/ssh_agent/src/protocol/connection.rs @@ -57,7 +57,7 @@ impl ConnectionInfo { self.host_name.as_ref() } - pub fn set_host_key(&mut self, host_key: PublicKey) { + pub fn set_host_key(&mut self, host_key: &PublicKey) { self.host_key = Some(host_key.clone()); // Some systems (flatpak, macos sandbox) may prevent access to the known hosts file. if let Ok(hosts) = knownhosts::KnownHostsReader::read_default() {