Address clippy warnings

This commit is contained in:
topjohnwu
2023-09-06 21:45:12 -07:00
parent 4fff2aa7d8
commit 4eaf701cb7
5 changed files with 9 additions and 8 deletions

View File

@@ -86,8 +86,7 @@ pub fn patch_encryption(buf: &mut [u8]) -> usize {
}
fn hex2byte(hex: &[u8]) -> Vec<u8> {
let mut v = Vec::new();
v.reserve(hex.len() / 2);
let mut v = Vec::with_capacity(hex.len() / 2);
for bytes in hex.chunks(2) {
if bytes.len() != 2 {
break;