summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-02-10 07:38:33 -0500
committerAndrew Gallant <jamslam@gmail.com>2019-02-10 07:40:32 -0500
commit626ed00c196d54411ed2793b1568b1c48ccc95a0 (patch)
tree9205c05d51252a2d28cb7906c671cc23f4215ba9
parent332ad1840130f8696343c115c8fad2c808da16b5 (diff)
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 a4868b88351318182eed3b801d0c97a106a7d38f. Fixes #1144 (again), Closes #1194
-rw-r--r--Cargo.lock6
-rw-r--r--grep-searcher/src/lines.rs7
2 files changed, 3 insertions, 10 deletions
diff --git a/Cargo.lock b/Cargo.lock
index ee0790d8..aae4e68c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -38,7 +38,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bytecount"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -211,7 +211,7 @@ dependencies = [
name = "grep-searcher"
version = "0.1.2"
dependencies = [
- "bytecount 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bytecount 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs_io 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"grep-matcher 0.1.1",
@@ -714,7 +714,7 @@ dependencies = [
"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
-"checksum bytecount 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c219c0335c21a8bd79587ce5aee9f64aff1d0bd7a2cca7a58a815f9780cd3b0d"
+"checksum bytecount 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be0fdd54b507df8f22012890aadd099979befdba27713c767993f8380112ca7c"
"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb"
"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749"
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
diff --git a/grep-searcher/src/lines.rs b/grep-searcher/src/lines.rs
index 9393234c..ed225a42 100644
--- a/grep-searcher/src/lines.rs
+++ b/grep-searcher/src/lines.rs
@@ -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)]