Skip to content

Commit

Permalink
clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Jan 21, 2024
1 parent e8207e4 commit 8b09ea4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions agent/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,7 @@ fn find_first_jpeg_eoi(bytes: &BytesMut) -> Option<usize> {
return None;
}

for i in 0..bytes.len() - 1 {
if bytes[i] == 0xFF && bytes[i + 1] == 0xD9 {
return Some(i);
}
}

None
(0..bytes.len() - 1).find(|&i| bytes[i] == 0xFF && bytes[i + 1] == 0xD9)
}

#[cfg(test)]
Expand Down

0 comments on commit 8b09ea4

Please sign in to comment.