summaryrefslogtreecommitdiffstats
path: root/grep-searcher/src/testutil.rs
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2019-06-26 16:47:33 -0400
committerAndrew Gallant <jamslam@gmail.com>2019-06-26 16:47:33 -0400
commitb93762ea7a397b54e9ccf589a45a2c6ad91bc390 (patch)
tree54152ae9fb21c14f95ceefcb35e2d5b2f86295b1 /grep-searcher/src/testutil.rs
parent34677d262246462ce3027ee57be1869a9dc7730a (diff)
bstr: update everything to bstr 0.2
Diffstat (limited to 'grep-searcher/src/testutil.rs')
-rw-r--r--grep-searcher/src/testutil.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/grep-searcher/src/testutil.rs b/grep-searcher/src/testutil.rs
index 416e4e32..ec7e29ba 100644
--- a/grep-searcher/src/testutil.rs
+++ b/grep-searcher/src/testutil.rs
@@ -1,7 +1,7 @@
use std::io::{self, Write};
use std::str;
-use bstr::B;
+use bstr::ByteSlice;
use grep_matcher::{
LineMatchKind, LineTerminator, Match, Matcher, NoCaptures, NoError,
};
@@ -94,7 +94,7 @@ impl Matcher for RegexMatcher {
}
// Make it interesting and return the last byte in the current
// line.
- let i = B(haystack)
+ let i = haystack
.find_byte(self.line_term.unwrap().as_byte())
.map(|i| i)
.unwrap_or(haystack.len() - 1);