about summary refs log tree commit diff
path: root/src/libsyntax/opt_vec.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:21:21 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:40:19 -0800
commit492677ec1e4e66a57a2fce78962db2f89932dd74 (patch)
tree7215ca2d3af530efb17aee207f95365ca374ac00 /src/libsyntax/opt_vec.rs
parent18a30aff4564437ccd2698be367ca98c81122ac0 (diff)
downloadrust-492677ec1e4e66a57a2fce78962db2f89932dd74.tar.gz
rust-492677ec1e4e66a57a2fce78962db2f89932dd74.zip
libsyntax: Change all uses of `&fn` to `||`.
Diffstat (limited to 'src/libsyntax/opt_vec.rs')
-rw-r--r--src/libsyntax/opt_vec.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs
index 4d39d4df72f..3a0b7c6adc4 100644
--- a/src/libsyntax/opt_vec.rs
+++ b/src/libsyntax/opt_vec.rs
@@ -50,14 +50,14 @@ impl<T> OptVec<T> {
         *self = Vec(~[t]);
     }
 
-    pub fn map<U>(&self, op: &fn(&T) -> U) -> OptVec<U> {
+    pub fn map<U>(&self, op: |&T| -> U) -> OptVec<U> {
         match *self {
             Empty => Empty,
             Vec(ref v) => Vec(v.map(op))
         }
     }
 
-    pub fn map_move<U>(self, op: &fn(T) -> U) -> OptVec<U> {
+    pub fn map_move<U>(self, op: |T| -> U) -> OptVec<U> {
         match self {
             Empty => Empty,
             Vec(v) => Vec(v.move_iter().map(op).collect())
@@ -91,11 +91,11 @@ impl<T> OptVec<T> {
     }
 
     #[inline]
-    pub fn map_to_vec<B>(&self, op: &fn(&T) -> B) -> ~[B] {
+    pub fn map_to_vec<B>(&self, op: |&T| -> B) -> ~[B] {
         self.iter().map(op).collect()
     }
 
-    pub fn mapi_to_vec<B>(&self, op: &fn(uint, &T) -> B) -> ~[B] {
+    pub fn mapi_to_vec<B>(&self, op: |uint, &T| -> B) -> ~[B] {
         let mut index = 0;
         self.map_to_vec(|a| {
             let i = index;