fix(voice): dropped redundant pub(crate) in private device module

clippy-strict (nursery redundant_pub_crate, -D warnings) rejects pub(crate)
items inside the crate-private device module; plain pub is equivalent there.
Applied across all platform backends since CI only lints the linux cfg.
This commit is contained in:
can1357
2026-08-07 23:46:48 +02:00
parent 055a5d4f26
commit 81e0c3f6bf
5 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -264,7 +264,7 @@ unsafe extern "C" fn capture_callback(
}
/// Running `CoreAudio` default-speaker queue.
pub(crate) struct PlaybackDevice {
pub struct PlaybackDevice {
queue: Option<QueueHandle>,
context: Option<Box<PlaybackContext>>,
stopped: Arc<AtomicBool>,
@@ -374,7 +374,7 @@ impl Drop for PlaybackDevice {
}
/// Running `CoreAudio` default-microphone queue.
pub(crate) struct CaptureDevice {
pub struct CaptureDevice {
queue: Option<QueueHandle>,
context: Option<Box<CaptureContext>>,
stopped: Arc<AtomicBool>,
+2 -2
View File
@@ -719,7 +719,7 @@ fn finish(
}
/// Running `PulseAudio` or ALSA playback worker.
pub(crate) struct PlaybackDevice {
pub struct PlaybackDevice {
device: Arc<RunningDevice>,
thread: Option<JoinHandle<()>>,
done: Option<mpsc::Receiver<()>>,
@@ -819,7 +819,7 @@ impl Drop for PlaybackDevice {
}
/// Running `PulseAudio` or ALSA capture worker.
pub(crate) struct CaptureDevice {
pub struct CaptureDevice {
device: Arc<RunningDevice>,
thread: Option<JoinHandle<()>>,
done: Option<mpsc::Receiver<()>>,
+5 -5
View File
@@ -48,14 +48,14 @@ use unsupported as imp;
use crate::VoiceResult;
/// Render callback: fill the whole output buffer with mono `f32` samples.
pub(crate) type PlaybackFill = Box<dyn FnMut(&mut [f32]) + Send + 'static>;
pub type PlaybackFill = Box<dyn FnMut(&mut [f32]) + Send + 'static>;
/// Capture callback: consume a non-empty chunk of mono `f32` samples.
pub(crate) type CaptureSink = Box<dyn FnMut(&[f32]) + Send + 'static>;
pub type CaptureSink = Box<dyn FnMut(&[f32]) + Send + 'static>;
/// Stream parameters shared by both device directions.
#[derive(Clone, Copy)]
pub(crate) struct DeviceConfig {
pub struct DeviceConfig {
/// Logical client-side sample rate in Hz; the OS converts to hardware.
pub sample_rate: u32,
/// Target callback period in milliseconds.
@@ -70,7 +70,7 @@ impl DeviceConfig {
}
/// Running default-speaker playback stream driven by a fill callback.
pub(crate) struct PlaybackDevice {
pub struct PlaybackDevice {
inner: imp::PlaybackDevice,
}
@@ -88,7 +88,7 @@ impl PlaybackDevice {
}
/// Running default-microphone capture stream driven by a sink callback.
pub(crate) struct CaptureDevice {
pub struct CaptureDevice {
inner: imp::CaptureDevice,
}
+2 -2
View File
@@ -5,7 +5,7 @@ use crate::VoiceResult;
const UNSUPPORTED: &str = "Native audio is not supported on this platform";
pub(crate) struct PlaybackDevice;
pub struct PlaybackDevice;
impl PlaybackDevice {
pub fn start(_config: DeviceConfig, _fill: PlaybackFill) -> VoiceResult<Self> {
@@ -17,7 +17,7 @@ impl PlaybackDevice {
}
}
pub(crate) struct CaptureDevice;
pub struct CaptureDevice;
impl CaptureDevice {
pub fn start(_config: DeviceConfig, _sink: CaptureSink) -> VoiceResult<Self> {
+2 -2
View File
@@ -493,7 +493,7 @@ impl Drop for CaptureStream {
}
}
pub(crate) struct PlaybackDevice {
pub struct PlaybackDevice {
stop: Arc<AtomicBool>,
event: Arc<OwnedEvent>,
thread: Option<JoinHandle<VoiceResult<()>>>,
@@ -536,7 +536,7 @@ impl Drop for PlaybackDevice {
}
}
pub(crate) struct CaptureDevice {
pub struct CaptureDevice {
stop: Arc<AtomicBool>,
event: Arc<OwnedEvent>,
thread: Option<JoinHandle<VoiceResult<()>>>,