Skip to content

Commit 2d0ccd9

Browse files
author
mtolman
committed
removed popcount
1 parent 310715c commit 2d0ccd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/zero_allocs/slice.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ pub const FieldParser = struct {
332332
const expected_lfs = (match_crs << 1) | (self._state.prev_cr >> (chunk_size - 1));
333333
const masked_lfs = expected_lfs & field_lfs;
334334

335-
if (@popCount(expected_lfs) != @popCount(masked_lfs)) {
335+
if (expected_lfs != masked_lfs) {
336336
self.err = CsvReadError.InvalidLineEnding;
337337
return null;
338338
}
@@ -383,12 +383,12 @@ pub const FieldParser = struct {
383383
const masked_end_seps = self._state.field_separators & expected_end_seps;
384384
const masked_sep_start = field_seps_start & expected_starts;
385385

386-
if (!at_end and @popCount(expected_end_seps) != @popCount(masked_end_seps)) {
386+
if (!at_end and expected_end_seps != masked_end_seps) {
387387
self.err = CsvReadError.QuotePrematurelyTerminated;
388388
return null;
389389
}
390390

391-
if (@popCount(masked_sep_start) != @popCount(expected_starts)) {
391+
if (masked_sep_start != expected_starts) {
392392
self.err = CsvReadError.UnexpectedQuote;
393393
return null;
394394
}

0 commit comments

Comments
 (0)