about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2012-10-13 17:07:14 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-11-20 16:39:30 -0800
commit9539724e8bf2a0109eeff3bec9fb49309de0f5f3 (patch)
tree7b0cdbb708a1278ae33cf7b0b10d3ac027313b07 /src/libstd
parent497a8b54b5b3f9daf0ec735d443c443ac29afeab (diff)
downloadrust-9539724e8bf2a0109eeff3bec9fb49309de0f5f3.tar.gz
rust-9539724e8bf2a0109eeff3bec9fb49309de0f5f3.zip
Remove parentheses from closure argument types
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fun_treemap.rs2
-rw-r--r--src/libstd/future.rs4
-rw-r--r--src/libstd/list.rs8
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/fun_treemap.rs b/src/libstd/fun_treemap.rs
index a1e29b03b45..200193a48a8 100644
--- a/src/libstd/fun_treemap.rs
+++ b/src/libstd/fun_treemap.rs
@@ -53,7 +53,7 @@ pub fn find<K: Eq Ord, V: Copy>(m: Treemap<K, V>, k: K) -> Option<V> {
 }
 
 /// Visit all pairs in the map in order.
-pub fn traverse<K, V: Copy>(m: Treemap<K, V>, f: fn((&K), (&V))) {
+pub fn traverse<K, V: Copy>(m: Treemap<K, V>, f: fn(&K, &V)) {
     match *m {
       Empty => (),
       /*
diff --git a/src/libstd/future.rs b/src/libstd/future.rs
index 17b487f16de..31144740c8a 100644
--- a/src/libstd/future.rs
+++ b/src/libstd/future.rs
@@ -51,7 +51,7 @@ impl<A> Future<A> {
         get_ref(self)
     }
 
-    fn with<B>(blk: fn((&A)) -> B) -> B {
+    fn with<B>(blk: fn(&A) -> B) -> B {
         //! Work with the value without copying it
 
         with(&self, blk)
@@ -164,7 +164,7 @@ pub fn get<A:Copy>(future: &Future<A>) -> A {
     *get_ref(future)
 }
 
-pub fn with<A,B>(future: &Future<A>, blk: fn((&A)) -> B) -> B {
+pub fn with<A,B>(future: &Future<A>, blk: fn(&A) -> B) -> B {
     //! Work with the value without copying it
 
     blk(get_ref(future))
diff --git a/src/libstd/list.rs b/src/libstd/list.rs
index d30bc853f71..35b9a92f5a8 100644
--- a/src/libstd/list.rs
+++ b/src/libstd/list.rs
@@ -29,7 +29,7 @@ pub fn from_vec<T: Copy>(v: &[T]) -> @List<T> {
  * * z - The initial value
  * * f - The function to apply
  */
-pub fn foldl<T: Copy, U>(z: T, ls: @List<U>, f: fn((&T), (&U)) -> T) -> T {
+pub fn foldl<T: Copy, U>(z: T, ls: @List<U>, f: fn(&T, &U) -> T) -> T {
     let mut accum: T = z;
     do iter(ls) |elt| { accum = f(&accum, elt);}
     accum
@@ -42,7 +42,7 @@ pub fn foldl<T: Copy, U>(z: T, ls: @List<U>, f: fn((&T), (&U)) -> T) -> T {
  * When function `f` returns true then an option containing the element
  * is returned. If `f` matches no elements then none is returned.
  */
-pub fn find<T: Copy>(ls: @List<T>, f: fn((&T)) -> bool) -> Option<T> {
+pub fn find<T: Copy>(ls: @List<T>, f: fn(&T) -> bool) -> Option<T> {
     let mut ls = ls;
     loop {
         ls = match *ls {
@@ -120,7 +120,7 @@ pure fn push<T: Copy>(ll: &mut @list<T>, vv: T) {
 */
 
 /// Iterate over a list
-pub fn iter<T>(l: @List<T>, f: fn((&T))) {
+pub fn iter<T>(l: @List<T>, f: fn(&T)) {
     let mut cur = l;
     loop {
         cur = match *cur {
@@ -134,7 +134,7 @@ pub fn iter<T>(l: @List<T>, f: fn((&T))) {
 }
 
 /// Iterate over a list
-pub fn each<T>(l: @List<T>, f: fn((&T)) -> bool) {
+pub fn each<T>(l: @List<T>, f: fn(&T) -> bool) {
     let mut cur = l;
     loop {
         cur = match *cur {