Skip to content

Commit 092c244

Browse files
committed
core: Rename iter::reverse to iter::reversed for consistency with vec mod
1 parent ad2f566 commit 092c244

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn foldr<A:copy,B,IA:iterable<A>>(
7777
self: IA, +b0: B, blk: fn(A, -B) -> B) -> B {
7878

7979
let b <- b0;
80-
reverse(self) {|a|
80+
reversed(self) {|a|
8181
b = blk(a, b);
8282
}
8383
ret b;
@@ -88,7 +88,7 @@ fn to_list<A:copy,IA:iterable<A>>(self: IA) -> [A] {
8888
}
8989

9090
// FIXME: This could be made more efficient with an riterable interface
91-
fn reverse<A:copy,IA:iterable<A>>(self: IA, blk: fn(A)) {
91+
fn reversed<A:copy,IA:iterable<A>>(self: IA, blk: fn(A)) {
9292
vec::riter(to_list(self), blk)
9393
}
9494

@@ -247,8 +247,8 @@ fn test_max_empty() {
247247
}
248248

249249
#[test]
250-
fn test_reverse() {
251-
assert to_list(bind reverse([1, 2, 3], _)) == [3, 2, 1];
250+
fn test_reversed() {
251+
assert to_list(bind reversed([1, 2, 3], _)) == [3, 2, 1];
252252
}
253253

254254
#[test]

0 commit comments

Comments
 (0)