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:
Siavash Sameni
2026-03-27 09:43:50 +04:00
parent 2ca25fd2bf
commit c8a95e27e4
2 changed files with 3 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ async fn handle_socket(socket: WebSocket, state: AppState, fingerprint: String)
}
// 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 {
while let Some(msg) = push_rx.recv().await {
if ws_tx.send(Message::Binary(msg.into())).await.is_err() {

View File

@@ -1,6 +1,6 @@
use std::collections::HashMap;
use std::sync::Arc;
use tokio::sync::{broadcast, Mutex, mpsc};
use tokio::sync::{Mutex, mpsc};
use crate::db::Database;
@@ -52,6 +52,7 @@ impl AppState {
}
/// Unregister a WS connection.
#[allow(dead_code)]
pub async fn unregister_ws(&self, fingerprint: &str, sender: &WsSender) {
let mut conns = self.connections.lock().await;
if let Some(senders) = conns.get_mut(fingerprint) {