diff --git a/src/bbox/idat.rs b/src/bbox/idat.rs index 1534ba7..d015fc2 100644 --- a/src/bbox/idat.rs +++ b/src/bbox/idat.rs @@ -12,7 +12,7 @@ pub struct IdatBox<'a> { #[allow(unused)] impl<'a> IdatBox<'a> { - pub fn parse(input: &'a [u8]) -> IResult<&'a [u8], IdatBox> { + pub fn parse(input: &'a [u8]) -> IResult<&'a [u8], IdatBox<'a>> { let (remain, header) = BoxHeader::parse(input)?; let box_size = usize::try_from(header.box_size).expect("box size must fit into a `usize`."); diff --git a/src/jpeg.rs b/src/jpeg.rs index 30f07a0..f054b3d 100644 --- a/src/jpeg.rs +++ b/src/jpeg.rs @@ -67,7 +67,7 @@ struct Segment<'a> { payload: &'a [u8], } -impl<'a> Segment<'a> { +impl Segment<'_> { pub fn payload_len(&self) -> usize { self.payload.len() } diff --git a/src/parser.rs b/src/parser.rs index bf07227..0a12767 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -40,7 +40,6 @@ use crate::{ /// Passing in a `BufRead` should be avoided because [`MediaParser`] comes with /// its own buffer management and the buffers can be shared between multiple /// parsing tasks, thus avoiding frequent memory allocations. - pub struct MediaSource { pub(crate) reader: R, pub(crate) buf: Vec,