summaryrefslogtreecommitdiffstats
path: root/globset
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-12-30 16:24:09 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-01-01 01:03:21 -0500
commit163e00677aaf7af8c32ec2cfd699e8d26bf8437c (patch)
tree32525bd68ec98d7ed1a87da2669d24823c9982c5 /globset
parentd58236fbdcd3708f63d6a2eb9836cf1389916788 (diff)
Update to regex 0.2.
Diffstat (limited to 'globset')
-rw-r--r--globset/Cargo.toml2
-rw-r--r--globset/src/glob.rs2
-rw-r--r--globset/src/lib.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/globset/Cargo.toml b/globset/Cargo.toml
index ae1fe062..98df4cff 100644
--- a/globset/Cargo.toml
+++ b/globset/Cargo.toml
@@ -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"
diff --git a/globset/src/glob.rs b/globset/src/glob.rs
index 279d5201..514e2ede 100644
--- a/globset/src/glob.rs
+++ b/globset/src/glob.rs
@@ -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(&regex::quote(&(b as char).to_string()));
+ s.push_str(&regex::escape(&(b as char).to_string()));
} else {
s.push_str(&format!("\\x{:02x}", b));
}
diff --git a/globset/src/lib.rs b/globset/src/lib.rs
index 3210c58a..ae6a9e5d 100644
--- a/globset/src/lib.rs
+++ b/globset/src/lib.rs
@@ -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()))
}