Skip to content

Commit

Permalink
Fix several nightly clippy warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinetiknz committed Feb 2, 2025
1 parent 1c72a5a commit 7c9b0db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mp4parse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,7 @@ fn read_fullbox_extra<T: ReadBytesExt>(src: &mut T) -> Result<(u8, u32)> {
let flags_c = src.read_u8()?;
Ok((
version,
u32::from(flags_a) << 16 | u32::from(flags_b) << 8 | u32::from(flags_c),
(u32::from(flags_a) << 16) | (u32::from(flags_b) << 8) | u32::from(flags_c),
))
}

Expand Down Expand Up @@ -4734,7 +4734,7 @@ fn read_ctts<T: Read>(src: &mut BMFFBox<T>) -> Result<CompositionOffsetBox> {

if counts
.checked_mul(8)
.map_or(true, |bytes| u64::from(bytes) > src.bytes_left())
.is_none_or(|bytes| u64::from(bytes) > src.bytes_left())
{
return Status::CttsBadSize.into();
}
Expand Down
2 changes: 1 addition & 1 deletion mp4parse/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ fn make_dfla(
}
};
let block_type = (block_type as u32) & 0x7f;
s.B32(flag << 31 | block_type << 24 | size)
s.B32((flag << 31) | (block_type << 24) | size)
.append_bytes(data)
})
}
Expand Down

0 comments on commit 7c9b0db

Please # to comment.