diff --git a/ewebsock/src/native_tungstenite.rs b/ewebsock/src/native_tungstenite.rs index 3e0b2dc..ee2ef15 100644 --- a/ewebsock/src/native_tungstenite.rs +++ b/ewebsock/src/native_tungstenite.rs @@ -29,6 +29,7 @@ impl WsSender { /// Send a message. /// /// You have to wait for [`WsEvent::Opened`] before you can start sending messages. + #[allow(clippy::needless_pass_by_ref_mut)] // Allowed to ensure consistent API with WASM pub fn send(&mut self, msg: WsMessage) { if let Some(tx) = &self.tx { tx.send(msg).ok(); diff --git a/ewebsock/src/native_tungstenite_tokio.rs b/ewebsock/src/native_tungstenite_tokio.rs index 69f6f09..ed9bd45 100644 --- a/ewebsock/src/native_tungstenite_tokio.rs +++ b/ewebsock/src/native_tungstenite_tokio.rs @@ -20,6 +20,7 @@ impl WsSender { /// Send a message. /// /// You have to wait for [`WsEvent::Opened`] before you can start sending messages. + #[allow(clippy::needless_pass_by_ref_mut)] // Allowed to ensure consistent API with WASM pub fn send(&mut self, msg: WsMessage) { if let Some(tx) = self.tx.clone() { tokio::spawn(async move { tx.send(msg).await });