Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Jun 19, 2024
1 parent 528a11d commit 932a1b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/websocket/src/processor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::HashMap;
use std::sync::Arc;

use serde::{Deserialize, Serialize};
use tardis::basic::result::TardisResult;
Expand Down Expand Up @@ -127,7 +128,7 @@ impl Page {
}

#[oai(path = "/ws/broadcast/:name", method = "get")]
async fn ws_broadcast(&self, name: Path<String>, websocket: WebSocket, sender: Data<&Sender<TardisWebsocketMgrMessage>>) -> BoxWebSocketUpgraded {
async fn ws_broadcast(&self, name: Path<String>, websocket: WebSocket, sender: Data<&Sender<Arc<TardisWebsocketMgrMessage>>>) -> BoxWebSocketUpgraded {
pub struct Hooks {
ext: HashMap<String, String>,
}
Expand Down
4 changes: 2 additions & 2 deletions tardis/src/web/ws_processor/cluster_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl WsBroadcastSender for ClusterBroadcastChannel<TardisWebsocketMgrMessage> {
}

async fn send(&self, msg: TardisWebsocketMgrMessage) -> TardisResult<()> {
self.send(msg.into()).await
self.send(msg).await
}
}

Expand All @@ -20,6 +20,6 @@ impl WsBroadcastSender for Arc<ClusterBroadcastChannel<TardisWebsocketMgrMessage
}

async fn send(&self, msg: TardisWebsocketMgrMessage) -> TardisResult<()> {
ClusterBroadcastChannel::send(self, msg.into()).await
ClusterBroadcastChannel::send(self, msg).await
}
}

0 comments on commit 932a1b0

Please sign in to comment.