searcher: revert big-endian patch

This undoes the patch to stop using bytecount on big-endian
architectures. In particular, we bump our bytecount dependency to the
latest release, which has a fix.

This reverts commit a4868b8835.

Fixes #1144 (again), Closes #1194
This commit is contained in:
Andrew Gallant
2019-02-10 07:38:33 -05:00
parent 332ad18401
commit 626ed00c19
2 changed files with 3 additions and 10 deletions

View File

@@ -109,17 +109,10 @@ impl LineStep {
}
/// Count the number of occurrences of `line_term` in `bytes`.
#[cfg(target_endian = "little")]
pub fn count(bytes: &[u8], line_term: u8) -> u64 {
bytecount::count(bytes, line_term) as u64
}
/// Count the number of occurrences of `line_term` in `bytes`.
#[cfg(target_endian = "big")]
pub fn count(bytes: &[u8], line_term: u8) -> u64 {
bytecount::naive_count(bytes, line_term) as u64
}
/// Given a line that possibly ends with a terminator, return that line without
/// the terminator.
#[inline(always)]