Skip to content

Commit e0d5d03

Browse files
committed
Demode tuple
1 parent ef23d77 commit e0d5d03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libcore/tuple.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<T: Copy, U: Copy> (T, U): TupleOps<T,U> {
3636

3737
trait ExtendedTupleOps<A,B> {
3838
fn zip() -> ~[(A, B)];
39-
fn map<C>(f: fn(A, B) -> C) -> ~[C];
39+
fn map<C>(f: &fn(A, B) -> C) -> ~[C];
4040
}
4141

4242
impl<A: Copy, B: Copy> (&[A], &[B]): ExtendedTupleOps<A,B> {
@@ -46,7 +46,7 @@ impl<A: Copy, B: Copy> (&[A], &[B]): ExtendedTupleOps<A,B> {
4646
vec::zip_slice(a, b)
4747
}
4848

49-
fn map<C>(f: fn(A, B) -> C) -> ~[C] {
49+
fn map<C>(f: &fn(A, B) -> C) -> ~[C] {
5050
let (a, b) = self;
5151
vec::map2(a, b, f)
5252
}
@@ -60,7 +60,7 @@ impl<A: Copy, B: Copy> (~[A], ~[B]): ExtendedTupleOps<A,B> {
6060
vec::zip(move a, move b)
6161
}
6262

63-
fn map<C>(f: fn(A, B) -> C) -> ~[C] {
63+
fn map<C>(f: &fn(A, B) -> C) -> ~[C] {
6464
// FIXME #2543: Bad copy
6565
let (a, b) = copy self;
6666
vec::map2(a, b, f)

0 commit comments

Comments
 (0)