mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-26 09:42:00 -07:00
Update to regex 0.2.
This commit is contained in:
@@ -24,7 +24,7 @@ fnv = "1.0"
|
||||
lazy_static = "0.2"
|
||||
log = "0.3"
|
||||
memchr = "1"
|
||||
regex = "0.1.77"
|
||||
regex = "0.2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
glob = "0.2"
|
||||
|
@@ -666,7 +666,7 @@ fn bytes_to_escaped_literal(bs: &[u8]) -> String {
|
||||
let mut s = String::with_capacity(bs.len());
|
||||
for &b in bs {
|
||||
if b <= 0x7F {
|
||||
s.push_str(®ex::quote(&(b as char).to_string()));
|
||||
s.push_str(®ex::escape(&(b as char).to_string()));
|
||||
} else {
|
||||
s.push_str(&format!("\\x{:02x}", b));
|
||||
}
|
||||
|
@@ -202,7 +202,7 @@ fn new_regex(pat: &str) -> Result<Regex, Error> {
|
||||
.dot_matches_new_line(true)
|
||||
.size_limit(10 * (1 << 20))
|
||||
.dfa_size_limit(10 * (1 << 20))
|
||||
.compile()
|
||||
.build()
|
||||
.map_err(|err| Error::Regex(err.to_string()))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user