summaryrefslogtreecommitdiffstats
path: root/globset/src/glob.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 /globset/src/glob.rs
parent34677d262246462ce3027ee57be1869a9dc7730a (diff)
bstr: update everything to bstr 0.2
Diffstat (limited to 'globset/src/glob.rs')
-rw-r--r--globset/src/glob.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/globset/src/glob.rs b/globset/src/glob.rs
index 5e635a20..eccfb2d3 100644
--- a/globset/src/glob.rs
+++ b/globset/src/glob.rs
@@ -120,7 +120,7 @@ impl GlobMatcher {
/// Tests whether the given path matches this pattern or not.
pub fn is_match_candidate(&self, path: &Candidate) -> bool {
- self.re.is_match(path.path.as_bytes())
+ self.re.is_match(&path.path)
}
}
@@ -145,7 +145,7 @@ impl GlobStrategic {
/// Tests whether the given path matches this pattern or not.
fn is_match_candidate(&self, candidate: &Candidate) -> bool {
- let byte_path = candidate.path.as_bytes();
+ let byte_path = &*candidate.path;
match self.strategy {
MatchStrategy::Literal(ref lit) => lit.as_bytes() == byte_path,