From 1ae91cfac9f43686ba3b6e1f45170f555ea65ff0 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 2 Jan 2024 13:13:26 +0100 Subject: [PATCH] fix clippy --- lib/src/filter/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/filter/mod.rs b/lib/src/filter/mod.rs index 7c5db609..ec76221e 100644 --- a/lib/src/filter/mod.rs +++ b/lib/src/filter/mod.rs @@ -323,7 +323,7 @@ fn extend_video(node: &mut Media, chain: &mut Filters) { if let Some(video_duration) = node .probe .as_ref() - .and_then(|p| p.video_streams.get(0)) + .and_then(|p| p.video_streams.first()) .and_then(|v| v.duration.as_ref()) .and_then(|v| v.parse::().ok()) { @@ -369,7 +369,7 @@ fn extend_audio(node: &mut Media, chain: &mut Filters, nr: i32) { if let Some(audio_duration) = node .probe .as_ref() - .and_then(|p| p.audio_streams.get(0)) + .and_then(|p| p.audio_streams.first()) .and_then(|a| a.duration.clone()) .and_then(|a| a.parse::().ok()) { @@ -494,7 +494,7 @@ pub fn filter_chains( filters.audio_position = 1; } - if let Some(v_stream) = &probe.video_streams.get(0) { + if let Some(v_stream) = &probe.video_streams.first() { let aspect = aspect_calc(&v_stream.display_aspect_ratio, config); let frame_per_sec = fps_calc(&v_stream.r_frame_rate, 1.0);