Skip to content

Commit

Permalink
Implicit lifetimes
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Oct 28, 2024
1 parent c69cddb commit 0cd3fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ pub(crate) static DECODING_HOOKS: RwLock<Option<HashMap<ImageFormat, DecodingHoo

/// A wrapper around a type-erased trait object that implements `Read` and `Seek`.
pub struct BoxReadSeek<'a>(pub(crate) Box<dyn ReadSeek + 'a>);
impl<'a> Read for BoxReadSeek<'a> {
impl Read for BoxReadSeek<'_> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
self.0.read(buf)
}
}
impl<'a> Seek for BoxReadSeek<'a> {
impl Seek for BoxReadSeek<'_> {
fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result<u64> {
self.0.seek(pos)
}
Expand Down

0 comments on commit 0cd3fc7

Please sign in to comment.