about summary refs log tree commit diff
path: root/src/libstd/path
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-18 21:15:42 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:40:19 -0800
commit1946265e1a1a32eb922846f314657a4aa7eb1d23 (patch)
tree4b83f81bf1b265933a13605d9d35eab67a34ea8d /src/libstd/path
parenteef913b290f668b4f131ead5be65a1615616426b (diff)
downloadrust-1946265e1a1a32eb922846f314657a4aa7eb1d23.tar.gz
rust-1946265e1a1a32eb922846f314657a4aa7eb1d23.zip
libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstd
Diffstat (limited to 'src/libstd/path')
-rw-r--r--src/libstd/path/mod.rs2
-rw-r--r--src/libstd/path/posix.rs2
-rw-r--r--src/libstd/path/windows.rs5
3 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs
index 18f137e8b0e..6f152fa2a41 100644
--- a/src/libstd/path/mod.rs
+++ b/src/libstd/path/mod.rs
@@ -559,7 +559,7 @@ impl<'self, P: GenericPath> Display<'self, P> {
     /// If the path is not UTF-8, invalid sequences will be replaced with the
     /// unicode replacement char. This involves allocation.
     #[inline]
-    pub fn with_str<T>(&self, f: &fn(&str) -> T) -> T {
+    pub fn with_str<T>(&self, f: |&str| -> T) -> T {
         let opt = if self.filename { self.path.filename_str() }
                   else { self.path.as_str() };
         match opt {
diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs
index f14f100de73..86f1e7f6e86 100644
--- a/src/libstd/path/posix.rs
+++ b/src/libstd/path/posix.rs
@@ -87,7 +87,7 @@ impl ToCStr for Path {
 
 impl IterBytes for Path {
     #[inline]
-    fn iter_bytes(&self, lsb0: bool, f: &fn(buf: &[u8]) -> bool) -> bool {
+    fn iter_bytes(&self, lsb0: bool, f: |buf: &[u8]| -> bool) -> bool {
         self.repr.iter_bytes(lsb0, f)
     }
 }
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index 8483b504c01..d5bc6b85424 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -112,7 +112,7 @@ impl ToCStr for Path {
 
 impl IterBytes for Path {
     #[inline]
-    fn iter_bytes(&self, lsb0: bool, f: &fn(&[u8]) -> bool) -> bool {
+    fn iter_bytes(&self, lsb0: bool, f: |&[u8]| -> bool) -> bool {
         self.repr.iter_bytes(lsb0, f)
     }
 }
@@ -970,7 +970,8 @@ fn parse_prefix<'a>(mut path: &'a str) -> Option<PathPrefix> {
     }
     return None;
 
-    fn parse_two_comps<'a>(mut path: &'a str, f: &fn(char)->bool) -> Option<(uint, uint)> {
+    fn parse_two_comps<'a>(mut path: &'a str, f: |char| -> bool)
+                       -> Option<(uint, uint)> {
         let idx_a = match path.find(|x| f(x)) {
             None => return None,
             Some(x) => x