From 67ad83a2b2924fa891693fbb0d3b94cad4fff22d Mon Sep 17 00:00:00 2001 From: lc Date: Thu, 13 Nov 2025 23:25:53 +0800 Subject: [PATCH] fix webrtc example when webrtc disabled --- examples/webrtc.rs | 2 +- src/webrtc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/webrtc.rs b/examples/webrtc.rs index 3b9162c..b7f3f06 100644 --- a/examples/webrtc.rs +++ b/examples/webrtc.rs @@ -63,7 +63,7 @@ async fn main() -> Result<()> { // Wait for the answer to be pasted println!( "Start new terminal run: \n{} \ncopy remote endpoint and paste here", - format!("cargo r --example webrtc -- --offer {}", local_endpoint) + format!("cargo r --features webrtc --example webrtc -- --offer {}", local_endpoint) ); // readline blocking let line = std::io::stdin() diff --git a/src/webrtc.rs b/src/webrtc.rs index dc1e621..597acf3 100644 --- a/src/webrtc.rs +++ b/src/webrtc.rs @@ -100,7 +100,7 @@ impl WebRTCStream { Self::get_remote_offer(remote_endpoint)? }; - let key = remote_offer.clone(); + let mut key = remote_offer.clone(); let mut lock = SESSIONS.lock().await; if let Some(cached_stream) = lock.get(&key) { if !key.is_empty() {