We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cdae651 + da68b82 commit c675117Copy full SHA for c675117
src/gz/bufread.rs
@@ -10,9 +10,7 @@ use crate::Compression;
10
11
fn copy(into: &mut [u8], from: &[u8], pos: &mut usize) -> usize {
12
let min = cmp::min(into.len(), from.len() - *pos);
13
- for (slot, val) in into.iter_mut().zip(from[*pos..*pos + min].iter()) {
14
- *slot = *val;
15
- }
+ into[..min].copy_from_slice(&from[*pos..*pos + min]);
16
*pos += min;
17
min
18
}
0 commit comments