Removing explicit uses of + mode
This removes most explicit uses of the + argument mode. Pending a snapshot, I had to remove the forbid(deprecated_modes) pragma from a bunch of files. I'll put it back! + mode still has to be used in a few places for functions that get moved (see task.rs) The changes outside core and std are due to the to_bytes trait and making the compiler (with legacy modes on) agree with the libraries (with legacy modes off) about modes.
This commit is contained in:
@@ -16,7 +16,7 @@ impl<A> IMPL_T<A>: iter::ExtendedIter<A> {
|
||||
pure fn eachi(blk: fn(uint, v: &A) -> bool) { iter::eachi(&self, blk) }
|
||||
pure fn all(blk: fn(&A) -> bool) -> bool { iter::all(&self, blk) }
|
||||
pure fn any(blk: fn(&A) -> bool) -> bool { iter::any(&self, blk) }
|
||||
pure fn foldl<B>(+b0: B, blk: fn(&B, &A) -> B) -> B {
|
||||
pure fn foldl<B>(b0: B, blk: fn(&B, &A) -> B) -> B {
|
||||
iter::foldl(&self, move b0, blk)
|
||||
}
|
||||
pure fn position(f: fn(&A) -> bool) -> Option<uint> {
|
||||
@@ -30,20 +30,20 @@ impl<A: Eq> IMPL_T<A>: iter::EqIter<A> {
|
||||
}
|
||||
|
||||
impl<A: Copy> IMPL_T<A>: iter::CopyableIter<A> {
|
||||
pure fn filter_to_vec(pred: fn(+a: A) -> bool) -> ~[A] {
|
||||
pure fn filter_to_vec(pred: fn(a: A) -> bool) -> ~[A] {
|
||||
iter::filter_to_vec(&self, pred)
|
||||
}
|
||||
pure fn map_to_vec<B>(op: fn(+v: A) -> B) -> ~[B] {
|
||||
pure fn map_to_vec<B>(op: fn(v: A) -> B) -> ~[B] {
|
||||
iter::map_to_vec(&self, op)
|
||||
}
|
||||
pure fn to_vec() -> ~[A] { iter::to_vec(&self) }
|
||||
|
||||
pure fn flat_map_to_vec<B:Copy,IB:BaseIter<B>>(op: fn(+a: A) -> IB)
|
||||
pure fn flat_map_to_vec<B:Copy,IB:BaseIter<B>>(op: fn(a: A) -> IB)
|
||||
-> ~[B] {
|
||||
iter::flat_map_to_vec(&self, op)
|
||||
}
|
||||
|
||||
pure fn find(p: fn(+a: A) -> bool) -> Option<A> { iter::find(&self, p) }
|
||||
pure fn find(p: fn(a: A) -> bool) -> Option<A> { iter::find(&self, p) }
|
||||
}
|
||||
|
||||
impl<A: Copy Ord> IMPL_T<A>: iter::CopyableOrderedIter<A> {
|
||||
|
||||
Reference in New Issue
Block a user