File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff 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
4040fn get_mp4_muxer_buffer_size ( instant_mode : bool ) -> usize {
Original file line number Diff line number Diff 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( ) ;
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments