Skip to content

Commit e40c552

Browse files
committed
---
yaml --- r: 24290 b: refs/heads/master c: 84b0583 h: refs/heads/master v: v3
1 parent ebc81c9 commit e40c552

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a3a257cc3b29cb134b05a72adbfeff08f1e7a98c
2+
refs/heads/master: 84b058306472810edb4bc215cea621f1890b8b02
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/iter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pure fn foldl<A,B,IA:BaseIter<A>>(self: &IA, +b0: B, blk: fn(&B, &A) -> B)
128128
}
129129

130130
pure fn to_vec<A:Copy,IA:BaseIter<A>>(self: &IA) -> ~[A] {
131-
foldl::<A,~[A],IA>(self, ~[], |r, a| vec::append(*r, ~[*a]))
131+
foldl::<A,~[A],IA>(self, ~[], |r, a| vec::append(copy (*r), ~[*a]))
132132
}
133133

134134
pure fn contains<A:Eq,IA:BaseIter<A>>(self: IA, x: &A) -> bool {
@@ -174,7 +174,7 @@ pure fn repeat(times: uint, blk: fn() -> bool) {
174174
pure fn min<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
175175
match do foldl::<A,Option<A>,IA>(self, None) |a, b| {
176176
match a {
177-
&Some(a_) if a_ < *b => {
177+
&Some(ref a_) if *a_ < *b => {
178178
*(move a)
179179
}
180180
_ => Some(*b)
@@ -188,7 +188,7 @@ pure fn min<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
188188
pure fn max<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
189189
match do foldl::<A,Option<A>,IA>(self, None) |a, b| {
190190
match a {
191-
&Some(a_) if a_ > *b => {
191+
&Some(ref a_) if *a_ > *b => {
192192
*(move a)
193193
}
194194
_ => Some(*b)

0 commit comments

Comments
 (0)