summaryrefslogtreecommitdiffstats
path: root/globset/src/glob.rs
diff options
context:
space:
mode:
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,