From 597974f7d85eef71cee87f72652028eb3864d08d Mon Sep 17 00:00:00 2001 From: yubiuser Date: Mon, 16 Dec 2024 18:31:46 +0100 Subject: [PATCH] Remove session_id clones (#1422) Signed-off-by: yubiuser --- connect/src/spirc.rs | 2 +- core/src/session.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index e3892866..1ed9bd12 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -1554,7 +1554,7 @@ impl SpircTask { ); if self.session.session_id() != session.session_id { - self.session.set_session_id(session.session_id.clone()); + self.session.set_session_id(&session.session_id); self.connect_state.set_session_id(session.session_id); } } else { diff --git a/core/src/session.rs b/core/src/session.rs index 5526da48..92933e35 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -389,7 +389,7 @@ impl Session { self.0.data.read().session_id.clone() } - pub fn set_session_id(&self, session_id: String) { + pub fn set_session_id(&self, session_id: &str) { session_id.clone_into(&mut self.0.data.write().session_id); }