Fix 3 warnings: unused import, unused variable, dead code
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,7 +65,7 @@ async fn handle_socket(socket: WebSocket, state: AppState, fingerprint: String)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Spawn task to forward push messages to WS
|
// Spawn task to forward push messages to WS
|
||||||
let fp_clone = fingerprint.clone();
|
let _fp_clone = fingerprint.clone();
|
||||||
let mut push_task = tokio::spawn(async move {
|
let mut push_task = tokio::spawn(async move {
|
||||||
while let Some(msg) = push_rx.recv().await {
|
while let Some(msg) = push_rx.recv().await {
|
||||||
if ws_tx.send(Message::Binary(msg.into())).await.is_err() {
|
if ws_tx.send(Message::Binary(msg.into())).await.is_err() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio::sync::{broadcast, Mutex, mpsc};
|
use tokio::sync::{Mutex, mpsc};
|
||||||
|
|
||||||
use crate::db::Database;
|
use crate::db::Database;
|
||||||
|
|
||||||
@@ -52,6 +52,7 @@ impl AppState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Unregister a WS connection.
|
/// Unregister a WS connection.
|
||||||
|
#[allow(dead_code)]
|
||||||
pub async fn unregister_ws(&self, fingerprint: &str, sender: &WsSender) {
|
pub async fn unregister_ws(&self, fingerprint: &str, sender: &WsSender) {
|
||||||
let mut conns = self.connections.lock().await;
|
let mut conns = self.connections.lock().await;
|
||||||
if let Some(senders) = conns.get_mut(fingerprint) {
|
if let Some(senders) = conns.get_mut(fingerprint) {
|
||||||
|
|||||||
Reference in New Issue
Block a user