fix(trunk): trait imports (AudioSink, AudioSource) for trunk_driver + clippy let_and_return on test helper (slice-5 T4)
Signed-off-by: Aaron D. Lee <himself@adlee.work>
This commit is contained in:
@@ -94,7 +94,7 @@ impl<P: rutster_media::AudioPipe + Send> TrunkSession<P> {
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use super::*;
|
||||
use rutster_media::{EchoAudioPipe, Reflex, ReflexMetrics, LocalVadReflex};
|
||||
use rutster_media::{EchoAudioPipe, LocalVadReflex, Reflex, ReflexMetrics};
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
/// Build a `TrunkSession<EchoAudioPipe>` with no real brain wiring
|
||||
@@ -107,13 +107,10 @@ pub mod tests {
|
||||
let metrics = ReflexMetrics::new();
|
||||
let reflex = Reflex::new(EchoAudioPipe::new(), advisory_rx, metrics);
|
||||
let wrapped = LocalVadReflex::new(reflex, advisory_tx);
|
||||
let (inbound_tx, inbound_rx) = mpsc::channel(16);
|
||||
let (outbound_tx, outbound_rx) = mpsc::channel(16);
|
||||
let (_inbound_tx, inbound_rx) = mpsc::channel(16);
|
||||
let (outbound_tx, _outbound_rx) = mpsc::channel(16);
|
||||
let channel = Channel::new_inbound();
|
||||
let mut session = TrunkSession::new(channel, wrapped, inbound_rx, outbound_tx, now);
|
||||
// Expose the tx side to the test via a leak into a multi-call test.
|
||||
session.last_idle_rx = now;
|
||||
session
|
||||
TrunkSession::new(channel, wrapped, inbound_rx, outbound_tx, now)
|
||||
}
|
||||
|
||||
/// EchoAudioPipe ownership partner of [`trunk_session_with_echo_pipe`]:
|
||||
|
||||
Reference in New Issue
Block a user