Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
clippy
Richie McIlroy6d1d3c1e1b40
diff --git a/crates/recording/src/output_pipeline/core.rs b/crates/recording/src/output_pipeline/core.rsindex 737cb368a..b184cc0be 100644--- a/crates/recording/src/output_pipeline/core.rs+++ b/crates/recording/src/output_pipeline/core.rs@@ -419,7 +419,7 @@ impl TimestampAnomalyTracker {jump_secs: f64,now: Instant,) -> Result<Duration, TimestampAnomalyError> {- let wall_clock_confirmed = self.last_valid_wall_clock.map_or(false, |last_wc| {+ let wall_clock_confirmed = self.last_valid_wall_clock.is_some_and(|last_wc| {let wall_clock_gap_secs = now.duration_since(last_wc).as_secs_f64();wall_clock_gap_secs >= jump_secs * 0.5});diff --git a/crates/recording/src/output_pipeline/macos.rs b/crates/recording/src/output_pipeline/macos.rsindex 5a190257a..dc03b7a51 100644--- a/crates/recording/src/output_pipeline/macos.rs+++ b/crates/recording/src/output_pipeline/macos.rs@@ -34,7 +34,7 @@ fn get_available_disk_space_mb(path: &std::path::Path) -> Option<u64> {if result != 0 {return None;}- Some((stat.f_bavail as u64).saturating_mul(stat.f_frsize as u64) / (1024 * 1024))+ Some((stat.f_bavail as u64).saturating_mul(stat.f_frsize) / (1024 * 1024))}fn get_mp4_muxer_buffer_size(instant_mode: bool) -> usize {diff --git a/crates/recording/src/sources/camera.rs b/crates/recording/src/sources/camera.rsindex db0fa42b9..aede5e52d 100644--- a/crates/recording/src/sources/camera.rs+++ b/crates/recording/src/sources/camera.rs@@ -133,7 +133,7 @@ impl VideoSource for Camera {if frame_width != original_width || frame_height != original_height {let needs_new_scaler = scaler.as_ref()- .map_or(true, |s| !s.matches_source(frame_width, frame_height));+ .is_none_or(|s| !s.matches_source(frame_width, frame_height));if needs_new_scaler {let frame_format = frame.inner.format();diff --git a/crates/recording/src/sources/microphone.rs b/crates/recording/src/sources/microphone.rsindex 3e8b6247f..4bdd47522 100644--- a/crates/recording/src/sources/microphone.rs+++ b/crates/recording/src/sources/microphone.rs@@ -299,12 +299,10 @@ impl AudioSource for Microphone {silence_counter.fetch_add(1, Ordering::Relaxed);- match tokio::time::timeout(send_timeout, audio_tx.send(audio_frame))- .await- {- Ok(Ok(())) => {}- _ => {}- }+ if let Ok(Ok(())) =+ tokio::time::timeout(send_timeout, audio_tx.send(audio_frame))+ .await+ {}}}}