about summary refs log tree commit diff
path: root/src/libglob
diff options
context:
space:
mode:
Diffstat (limited to 'src/libglob')
-rw-r--r--src/libglob/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libglob/lib.rs b/src/libglob/lib.rs
index e7661b26b76..3cad5bf8175 100644
--- a/src/libglob/lib.rs
+++ b/src/libglob/lib.rs
@@ -462,8 +462,8 @@ impl Pattern {
 fn fill_todo(todo: &mut Vec<(Path, uint)>, patterns: &[Pattern], idx: uint, path: &Path,
              options: MatchOptions) {
     // convert a pattern that's just many Char(_) to a string
-    fn pattern_as_str(pattern: &Pattern) -> Option<~str> {
-        let mut s = ~"";
+    fn pattern_as_str(pattern: &Pattern) -> Option<StrBuf> {
+        let mut s = StrBuf::new();
         for token in pattern.tokens.iter() {
             match *token {
                 Char(c) => s.push_char(c),
@@ -493,8 +493,8 @@ fn fill_todo(todo: &mut Vec<(Path, uint)>, patterns: &[Pattern], idx: uint, path
             // continue. So instead of passing control back to the iterator,
             // we can just check for that one entry and potentially recurse
             // right away.
-            let special = "." == s || ".." == s;
-            let next_path = path.join(s);
+            let special = "." == s.as_slice() || ".." == s.as_slice();
+            let next_path = path.join(s.as_slice());
             if (special && path.is_dir()) || (!special && next_path.exists()) {
                 add(todo, next_path);
             }