about summary refs log tree commit diff
path: root/src/libcore/path.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-06-30 16:19:07 -0700
committerBrian Anderson <banderson@mozilla.com>2012-07-01 19:19:32 -0700
commitd1fc2b5995fdef69fe1dbdbba3703398c0aa547b (patch)
treeb6d14fd0e920512a29c64a671cc2a5bb90132abb /src/libcore/path.rs
parent13a8f545388929a07af110a950441e6a1b88473a (diff)
Convert to new closure syntax
Diffstat (limited to 'src/libcore/path.rs')
-rw-r--r--src/libcore/path.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libcore/path.rs b/src/libcore/path.rs
index fb92138f4a8..1b514b00759 100644
--- a/src/libcore/path.rs
+++ b/src/libcore/path.rs
@@ -61,9 +61,9 @@ fn path_is_absolute(p: str) -> bool {
 fn path_sep() -> str { ret str::from_char(consts::path_sep); }
 
 fn split_dirname_basename (pp: path) -> {dirname: str, basename: str} {
-    alt str::rfind(pp, {|ch|
+    alt str::rfind(pp, |ch|
         ch == consts::path_sep || ch == consts::alt_path_sep
-    }) {
+    ) {
       some(i) {
         {dirname: str::slice(pp, 0u, i),
          basename: str::slice(pp, i + 1u, str::len(pp))}
@@ -145,7 +145,7 @@ the first element of the returned vector will be the drive letter
 followed by a colon.
 "]
 fn split(p: path) -> ~[path] {
-    str::split_nonempty(p, {|c|
+    str::split_nonempty(p, |c| {
         c == consts::path_sep || c == consts::alt_path_sep
     })
 }
@@ -235,13 +235,12 @@ fn normalize(p: path) -> path {
     ret s;
 
     fn strip_dots(s: ~[path]) -> ~[path] {
-        vec::filter_map(s, { |elem|
+        vec::filter_map(s, |elem|
             if elem == "." {
                 option::none
             } else {
                 option::some(elem)
-            }
-        })
+            })
     }
 
     fn rollup_doubledots(s: ~[path]) -> ~[path] {