Skip to content

Commit 19070c2

Browse files
committed
chore: tidy up, clippy, fmt
1 parent c119ea3 commit 19070c2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ documentation = "https://docs.rs/cpal"
77
license = "Apache-2.0"
88
keywords = ["audio", "sound"]
99
edition = "2021"
10-
rust-version = "1.77"
10+
rust-version = "1.82"
1111

1212
[features]
1313
# ASIO backend for Windows

src/host/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ pub(crate) mod aaudio;
77
target_os = "netbsd"
88
))]
99
pub(crate) mod alsa;
10-
#[cfg(all(
11-
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"),
12-
feature = "pipewire"
13-
))]
14-
pub(crate) mod pipewire;
1510
#[cfg(all(windows, feature = "asio"))]
1611
pub(crate) mod asio;
1712
#[cfg(all(
@@ -36,6 +31,11 @@ pub(crate) mod emscripten;
3631
)
3732
))]
3833
pub(crate) mod jack;
34+
#[cfg(all(
35+
any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd"),
36+
feature = "pipewire"
37+
))]
38+
pub(crate) mod pipewire;
3939
#[cfg(windows)]
4040
pub(crate) mod wasapi;
4141
#[cfg(all(target_arch = "wasm32", feature = "wasm-bindgen"))]

src/host/pipewire/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl DeviceTrait for Device {
237237
let (pw_init_tx, pw_init_rv) = std::sync::mpsc::channel::<bool>();
238238
let device = self.clone();
239239
let config = config.clone();
240-
let wait_timeout = timeout.clone().unwrap_or(Duration::from_secs(2));
240+
let wait_timeout = timeout.unwrap_or(Duration::from_secs(2));
241241
let handle = thread::Builder::new()
242242
.name("pw_capture_music_in".to_owned())
243243
.spawn(move || {
@@ -299,7 +299,7 @@ impl DeviceTrait for Device {
299299
let (pw_init_tx, pw_init_rv) = std::sync::mpsc::channel::<bool>();
300300
let device = self.clone();
301301
let config = config.clone();
302-
let wait_timeout = timeout.clone().unwrap_or(Duration::from_secs(2));
302+
let wait_timeout = timeout.unwrap_or(Duration::from_secs(2));
303303
let handle = thread::Builder::new()
304304
.name("pw_capture_music_out".to_owned())
305305
.spawn(move || {

src/host/pipewire/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ where
240240

241241
let data = samples.as_ptr() as *mut ();
242242
let mut data =
243-
unsafe { Data::from_parts(data, n_samples as usize, user_data.sample_format) };
243+
unsafe { Data::from_parts(data, n_samples, user_data.sample_format) };
244244
if let Err(err) = user_data.publish_data_out(frames, &mut data) {
245245
(user_data.error_callback)(StreamError::BackendSpecific { err });
246246
}

0 commit comments

Comments
 (0)