Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
bypass a spurious needless_range_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Jun 7, 2023
1 parent a753a81 commit 6be1d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serde_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ impl<'de> Visitor<'de> for ByteArrayVisitor {
A: SeqAccess<'de>,
{
let mut arr = [u8::default(); 64];
for i in 0..64 {
arr[i] = seq
for (i, cell) in arr.iter_mut().enumerate() {
cell = seq
.next_element()?
.ok_or_else(|| DeserializeError::invalid_length(i, &self))?;
}
Expand Down

0 comments on commit 6be1d15

Please sign in to comment.