Skip to content

Commit

Permalink
chore: allow clippy warnings for API consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
c-git committed Dec 30, 2024
1 parent 332eea1 commit b1cc2a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ewebsock/src/native_tungstenite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions ewebsock/src/native_tungstenite_tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit b1cc2a7

Please sign in to comment.