clippy: Avoid unnecessary closures

This commit is contained in:
Ian Hobson
2023-05-12 16:52:06 +02:00
parent 7c01778029
commit cf5ec121da
2 changed files with 2 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ impl ChannelMask {
(0..18)
.map(|i| 1 << i)
.filter(|mask| mask & input_mask > 0)
.map(|mask| Into::<ChannelMask>::into(mask))
.map(ChannelMask::from)
.collect()
}
}

View File

@@ -585,7 +585,7 @@ impl<R: Read + Seek> WaveReader<R> {
Ok((start, length)) => {
buffer.resize(length as usize, 0x0);
self.inner.seek(SeekFrom::Start(start))?;
self.inner.read(buffer).map_err(|e| ParserError::IOError(e))
self.inner.read(buffer).map_err(ParserError::IOError)
}
Err(ParserError::ChunkMissing { signature: _ }) => Ok(0),
Err(any) => Err(any),