Skip to content

Commit f05166d

Browse files
remove retain
1 parent 5c55e67 commit f05166d

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/decoder.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ impl Decoder {
6464
}
6565

6666
// run SIMD pipeline once on the entire buffer
67-
let original_len = buf.len();
68-
6967
let mut padded = buf.to_vec();
7068
padded.resize(padded.len().next_multiple_of(64), 0);
7169

@@ -120,10 +118,6 @@ impl Decoder {
120118
extract_positions(n, base, &mut newline_pos);
121119
}
122120

123-
// filter out positions beyond original data
124-
comma_pos.retain(|&p| (p as usize) < original_len);
125-
newline_pos.retain(|&p| (p as usize) < original_len);
126-
127121
// cache everything
128122
self.cached_buf = buf.to_vec();
129123
self.cached_comma_pos = comma_pos;

0 commit comments

Comments
 (0)