Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

clippy

Richie McIlroy5966b252288c
diff --git a/crates/audio/src/latency.rs b/crates/audio/src/latency.rs
index 364c5d3fa..1edd2a895 100644
--- a/crates/audio/src/latency.rs
+++ b/crates/audio/src/latency.rs
@@ -686,14 +686,10 @@ mod macos {
match transport_kind {
OutputTransportKind::Airplay => {
- if latency_secs < AIRPLAY_MIN_LATENCY_SECS {
- latency_secs = AIRPLAY_MIN_LATENCY_SECS;
- }
+ latency_secs = latency_secs.max(AIRPLAY_MIN_LATENCY_SECS);
}
OutputTransportKind::Wireless | OutputTransportKind::ContinuityWireless => {
- if latency_secs < WIRELESS_MIN_LATENCY_SECS {
- latency_secs = WIRELESS_MIN_LATENCY_SECS;
- }
+ latency_secs = latency_secs.max(WIRELESS_MIN_LATENCY_SECS);
}
_ => {}
}
diff --git a/crates/utils/src/disk_space.rs b/crates/utils/src/disk_space.rs
index e8cbec742..29ddab0cc 100644
--- a/crates/utils/src/disk_space.rs
+++ b/crates/utils/src/disk_space.rs
@@ -70,7 +70,7 @@ pub fn free_bytes_for_path(path: &Path) -> io::Result<u64> {
Some(&mut total_number_of_bytes),
Some(&mut total_number_of_free_bytes),
)
- .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))?;
+ .map_err(|e| io::Error::other(e.to_string()))?;
}
Ok(free_bytes_available_to_caller)