mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
clippy: Avoid unnecessary closures
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user