Skip to content

Commit

Permalink
Avoid unnecessary by_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
vks committed Oct 21, 2021
1 parent bd0038d commit c1e859f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rand_core/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn fill_via_chunks<T: Observable>(src: &[T], dest: &mut [u8]) -> (usize, usize)
// This code is valid on all arches, but slower than the above:
let mut i = 0;
let mut iter = dest[..byte_len].chunks_exact_mut(size);
for chunk in iter.by_ref() {
for chunk in &mut iter {
chunk.copy_from_slice(src[i].to_le_bytes().as_ref());
i += 1;
}
Expand Down

0 comments on commit c1e859f

Please sign in to comment.