clippy: Use Vec::get() instead of iter().nth()

This commit is contained in:
Ian Hobson committed 2023-05-19 10:57:39 +02:00
1 parent b6c20ae410
commit 6989520743
1 file changed
+1 -1
+1 -1
View File
@@ -622,7 +622,7 @@ impl<R: Read + Seek> WaveReader<R> {
fourcc: FourCC,
index: u32,
) -> Result<(u64, u64), ParserError> {
if let Some((start, length)) = self.get_chunks_extents(fourcc)?.iter().nth(index as usize) {
if let Some((start, length)) = self.get_chunks_extents(fourcc)?.get(index as usize) {
Ok((*start, *length))
} else {
Err(ParserError::ChunkMissing { signature: fourcc })