Skip to content

Commit 2de4aa5

Browse files
committed
Fix pre-existing clippy failures
1 parent 0b7fc2b commit 2de4aa5

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

mp4parse/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5774,12 +5774,11 @@ fn read_video_sample_entry<T: Read>(
57745774
Status::ColrBadQuantityBMFF,
57755775
)?;
57765776
skip_box_content(&mut b)?;
5777-
} else {
5778-
if let ParsedColourInformation::Supported(colr) = read_colr(&mut b, strictness)?
5779-
{
5780-
debug!("Parsed colr box: {colr:?}");
5781-
colour_info = Some(colr);
5782-
}
5777+
} else if let ParsedColourInformation::Supported(colr) =
5778+
read_colr(&mut b, strictness)?
5779+
{
5780+
debug!("Parsed colr box: {colr:?}");
5781+
colour_info = Some(colr);
57835782
}
57845783
}
57855784
BoxType::MasteringDisplayColourVolumeBox => {

mp4parse/src/unstable.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,14 +239,8 @@ pub fn create_sample_table(
239239

240240
let start_decode = decode_time;
241241

242-
let start_composition_val: i64 = match start_composition {
243-
Some(sc) => sc.0,
244-
None => return None,
245-
};
246-
let end_composition_val: i64 = match end_composition {
247-
Some(ec) => ec.0,
248-
None => return None,
249-
};
242+
let start_composition_val: i64 = start_composition?.0;
243+
let end_composition_val: i64 = end_composition?.0;
250244

251245
let track_offset: i64 = track_offset_time.0;
252246

0 commit comments

Comments
 (0)