Skip to content

Commit 6d1d3c1

Browse files
committed
clippy
1 parent f60bbbe commit 6d1d3c1

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

crates/recording/src/output_pipeline/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ impl TimestampAnomalyTracker {
419419
jump_secs: f64,
420420
now: Instant,
421421
) -> Result<Duration, TimestampAnomalyError> {
422-
let wall_clock_confirmed = self.last_valid_wall_clock.map_or(false, |last_wc| {
422+
let wall_clock_confirmed = self.last_valid_wall_clock.is_some_and(|last_wc| {
423423
let wall_clock_gap_secs = now.duration_since(last_wc).as_secs_f64();
424424
wall_clock_gap_secs >= jump_secs * 0.5
425425
});

crates/recording/src/output_pipeline/macos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn get_available_disk_space_mb(path: &std::path::Path) -> Option<u64> {
3434
if result != 0 {
3535
return None;
3636
}
37-
Some((stat.f_bavail as u64).saturating_mul(stat.f_frsize as u64) / (1024 * 1024))
37+
Some((stat.f_bavail as u64).saturating_mul(stat.f_frsize) / (1024 * 1024))
3838
}
3939

4040
fn get_mp4_muxer_buffer_size(instant_mode: bool) -> usize {

crates/recording/src/sources/camera.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl VideoSource for Camera {
133133
if frame_width != original_width || frame_height != original_height {
134134
let needs_new_scaler = scaler
135135
.as_ref()
136-
.map_or(true, |s| !s.matches_source(frame_width, frame_height));
136+
.is_none_or(|s| !s.matches_source(frame_width, frame_height));
137137

138138
if needs_new_scaler {
139139
let frame_format = frame.inner.format();

crates/recording/src/sources/microphone.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,10 @@ impl AudioSource for Microphone {
299299

300300
silence_counter.fetch_add(1, Ordering::Relaxed);
301301

302-
match tokio::time::timeout(send_timeout, audio_tx.send(audio_frame))
303-
.await
304-
{
305-
Ok(Ok(())) => {}
306-
_ => {}
307-
}
302+
if let Ok(Ok(())) =
303+
tokio::time::timeout(send_timeout, audio_tx.send(audio_frame))
304+
.await
305+
{}
308306
}
309307
}
310308
}

0 commit comments

Comments
 (0)