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); }