[chore](trx-rs): resolve all compiler and clippy warnings
- trx-server/rig_handle: remove dead vchan_manager field (was set but never read after the virtual-channel refactor) - trx-server/listener: remove now-missing vchan_manager initializer - trx-server/main: remove vchan_manager_for_handle intermediates that only fed the dropped field - trx-server/audio: suppress too_many_arguments on run_audio_listener - trx-frontend-http/server: suppress too_many_arguments on build_server - trx-core/vchan: update module doc comment to not reference the removed RigHandle::vchan_manager field Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -122,6 +122,7 @@ async fn serve(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn build_server(
|
fn build_server(
|
||||||
addr: SocketAddr,
|
addr: SocketAddr,
|
||||||
state_rx: watch::Receiver<RigState>,
|
state_rx: watch::Receiver<RigState>,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
//! A *virtual channel* is an independent DSP slice within the capture bandwidth
|
//! A *virtual channel* is an independent DSP slice within the capture bandwidth
|
||||||
//! of an SDR rig. Each has its own frequency offset, demodulation mode, and
|
//! of an SDR rig. Each has its own frequency offset, demodulation mode, and
|
||||||
//! PCM audio broadcast. Traditional (non-SDR) rigs do not support virtual
|
//! PCM audio broadcast. Traditional (non-SDR) rigs do not support virtual
|
||||||
//! channels; their `RigHandle::vchan_manager` field will be `None`.
|
//! channels; virtual channel operations are not available for traditional rigs.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
|||||||
@@ -1774,6 +1774,7 @@ enum VChanCmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Run the audio TCP listener, accepting client connections.
|
/// Run the audio TCP listener, accepting client connections.
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub async fn run_audio_listener(
|
pub async fn run_audio_listener(
|
||||||
addr: SocketAddr,
|
addr: SocketAddr,
|
||||||
rx_audio: broadcast::Sender<Bytes>,
|
rx_audio: broadcast::Sender<Bytes>,
|
||||||
|
|||||||
@@ -466,7 +466,6 @@ mod tests {
|
|||||||
rig_tx,
|
rig_tx,
|
||||||
state_rx,
|
state_rx,
|
||||||
audio_port: 4531,
|
audio_port: 4531,
|
||||||
vchan_manager: None,
|
|
||||||
};
|
};
|
||||||
let mut map = HashMap::new();
|
let mut map = HashMap::new();
|
||||||
map.insert("default".to_string(), handle);
|
map.insert("default".to_string(), handle);
|
||||||
|
|||||||
@@ -1021,11 +1021,6 @@ async fn main() -> DynResult<()> {
|
|||||||
);
|
);
|
||||||
task_handles.extend(audio_handles);
|
task_handles.extend(audio_handles);
|
||||||
|
|
||||||
#[cfg(feature = "soapysdr")]
|
|
||||||
let vchan_manager_for_handle = sdr_vchan_manager;
|
|
||||||
#[cfg(not(feature = "soapysdr"))]
|
|
||||||
let vchan_manager_for_handle: Option<trx_core::vchan::SharedVChanManager> = None;
|
|
||||||
|
|
||||||
rig_handles.insert(
|
rig_handles.insert(
|
||||||
rig_cfg.id.clone(),
|
rig_cfg.id.clone(),
|
||||||
RigHandle {
|
RigHandle {
|
||||||
@@ -1034,7 +1029,6 @@ async fn main() -> DynResult<()> {
|
|||||||
rig_tx,
|
rig_tx,
|
||||||
state_rx,
|
state_rx,
|
||||||
audio_port: rig_cfg.audio.port,
|
audio_port: rig_cfg.audio.port,
|
||||||
vchan_manager: vchan_manager_for_handle,
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
use tokio::sync::{mpsc, watch};
|
use tokio::sync::{mpsc, watch};
|
||||||
|
|
||||||
use trx_core::vchan::SharedVChanManager;
|
|
||||||
use trx_core::rig::request::RigRequest;
|
use trx_core::rig::request::RigRequest;
|
||||||
use trx_core::rig::state::RigState;
|
use trx_core::rig::state::RigState;
|
||||||
|
|
||||||
@@ -25,6 +24,4 @@ pub struct RigHandle {
|
|||||||
pub state_rx: watch::Receiver<RigState>,
|
pub state_rx: watch::Receiver<RigState>,
|
||||||
/// Per-rig audio listener TCP port.
|
/// Per-rig audio listener TCP port.
|
||||||
pub audio_port: u16,
|
pub audio_port: u16,
|
||||||
/// Virtual channel manager; `Some` only for SDR rigs.
|
|
||||||
pub vchan_manager: Option<SharedVChanManager>,
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user