fix: eliminate all compiler warnings across client, relay, web
- Remove unused imports in featherchat.rs (tracing, QualityProfile) - Remove unused comfort_noise field from CallEncoder (cn_level is used instead) - Prefix unused _metrics_file in CliArgs - Prefix unused _addr in Participant - Remove unused RoomSlot struct and rooms field from web AppState - Remove unused HashMap import from web main Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -209,8 +209,6 @@ pub struct CallEncoder {
|
|||||||
timestamp_ms: u32,
|
timestamp_ms: u32,
|
||||||
/// Silence detector for suppression.
|
/// Silence detector for suppression.
|
||||||
silence_detector: SilenceDetector,
|
silence_detector: SilenceDetector,
|
||||||
/// Comfort noise generator for CN packets.
|
|
||||||
comfort_noise: ComfortNoise,
|
|
||||||
/// Whether silence suppression is enabled.
|
/// Whether silence suppression is enabled.
|
||||||
suppression_enabled: bool,
|
suppression_enabled: bool,
|
||||||
/// Total frames suppressed (telemetry).
|
/// Total frames suppressed (telemetry).
|
||||||
@@ -243,7 +241,6 @@ impl CallEncoder {
|
|||||||
config.silence_threshold_rms,
|
config.silence_threshold_rms,
|
||||||
config.silence_hangover_frames,
|
config.silence_hangover_frames,
|
||||||
),
|
),
|
||||||
comfort_noise: ComfortNoise::new(config.comfort_noise_level),
|
|
||||||
suppression_enabled: config.suppression_enabled,
|
suppression_enabled: config.suppression_enabled,
|
||||||
frames_suppressed: 0,
|
frames_suppressed: 0,
|
||||||
cn_counter: 0,
|
cn_counter: 0,
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ struct CliArgs {
|
|||||||
mnemonic: Option<String>,
|
mnemonic: Option<String>,
|
||||||
room: Option<String>,
|
room: Option<String>,
|
||||||
token: Option<String>,
|
token: Option<String>,
|
||||||
metrics_file: Option<String>,
|
_metrics_file: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CliArgs {
|
impl CliArgs {
|
||||||
@@ -220,7 +220,7 @@ fn parse_args() -> CliArgs {
|
|||||||
mnemonic,
|
mnemonic,
|
||||||
room,
|
room,
|
||||||
token,
|
token,
|
||||||
metrics_file,
|
_metrics_file: metrics_file,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,7 @@
|
|||||||
//! 5. Connects QUIC to relay for media
|
//! 5. Connects QUIC to relay for media
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tracing::{error, info};
|
|
||||||
|
|
||||||
use wzp_proto::packet::SignalMessage;
|
use wzp_proto::packet::SignalMessage;
|
||||||
use wzp_proto::QualityProfile;
|
|
||||||
|
|
||||||
/// featherChat CallSignal types (mirrors warzone-protocol::message::CallSignalType).
|
/// featherChat CallSignal types (mirrors warzone-protocol::message::CallSignalType).
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ fn next_id() -> ParticipantId {
|
|||||||
/// A participant in a room.
|
/// A participant in a room.
|
||||||
struct Participant {
|
struct Participant {
|
||||||
id: ParticipantId,
|
id: ParticipantId,
|
||||||
addr: std::net::SocketAddr,
|
_addr: std::net::SocketAddr,
|
||||||
transport: Arc<wzp_transport::QuinnTransport>,
|
transport: Arc<wzp_transport::QuinnTransport>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ impl Room {
|
|||||||
fn add(&mut self, addr: std::net::SocketAddr, transport: Arc<wzp_transport::QuinnTransport>) -> ParticipantId {
|
fn add(&mut self, addr: std::net::SocketAddr, transport: Arc<wzp_transport::QuinnTransport>) -> ParticipantId {
|
||||||
let id = next_id();
|
let id = next_id();
|
||||||
info!(room_size = self.participants.len() + 1, participant = id, %addr, "joined room");
|
info!(room_size = self.participants.len() + 1, participant = id, %addr, "joined room");
|
||||||
self.participants.push(Participant { id, addr, transport });
|
self.participants.push(Participant { id, _addr: addr, transport });
|
||||||
id
|
id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
//!
|
//!
|
||||||
//! Rooms: clients connect to /ws/<room-name> and are paired by room.
|
//! Rooms: clients connect to /ws/<room-name> and are paired by room.
|
||||||
|
|
||||||
use std::collections::HashMap;
|
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
@@ -33,19 +32,10 @@ const FRAME_SAMPLES: usize = 960;
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct AppState {
|
struct AppState {
|
||||||
relay_addr: SocketAddr,
|
relay_addr: SocketAddr,
|
||||||
rooms: Arc<Mutex<HashMap<String, RoomSlot>>>,
|
|
||||||
auth_url: Option<String>,
|
auth_url: Option<String>,
|
||||||
metrics: WebMetrics,
|
metrics: WebMetrics,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A waiting client in a room.
|
|
||||||
struct RoomSlot {
|
|
||||||
/// Sender half — send audio TO this waiting client's browser.
|
|
||||||
tx: tokio::sync::mpsc::Sender<Vec<u8>>,
|
|
||||||
/// Receiver half — receive audio FROM this waiting client's browser.
|
|
||||||
rx: Arc<Mutex<tokio::sync::mpsc::Receiver<Vec<i16>>>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
tracing_subscriber::fmt().init();
|
tracing_subscriber::fmt().init();
|
||||||
@@ -97,7 +87,6 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
let web_metrics = WebMetrics::new();
|
let web_metrics = WebMetrics::new();
|
||||||
let state = AppState {
|
let state = AppState {
|
||||||
relay_addr,
|
relay_addr,
|
||||||
rooms: Arc::new(Mutex::new(HashMap::new())),
|
|
||||||
auth_url,
|
auth_url,
|
||||||
metrics: web_metrics,
|
metrics: web_metrics,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user