fix(clippy): use as_chunks instead of chunks_exact
This commit is contained in:
1 file changed
+3
-1
@@ -115,7 +115,9 @@ fn parse_hex_pattern(body: &str) -> Option<Vec<u8>> {
|
|||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
digits
|
digits
|
||||||
.chunks_exact(2)
|
.as_chunks::<2>()
|
||||||
|
.0
|
||||||
|
.iter()
|
||||||
.map(|pair| Some(hex_digit(pair[0])? << 4 | hex_digit(pair[1])?))
|
.map(|pair| Some(hex_digit(pair[0])? << 4 | hex_digit(pair[1])?))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user