bstr: update everything to bstr 0.2

This commit is contained in:
Andrew Gallant
2019-06-26 16:47:33 -04:00
parent 34677d2622
commit b93762ea7a
20 changed files with 72 additions and 72 deletions

View File

@@ -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);