about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-09-28 17:59:01 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-09-28 17:59:01 -0700
commit84b058306472810edb4bc215cea621f1890b8b02 (patch)
tree07e6ab82e95e186f1734f1553f71589105030583 /src
parenta3a257cc3b29cb134b05a72adbfeff08f1e7a98c (diff)
downloadrust-84b058306472810edb4bc215cea621f1890b8b02.tar.gz
rust-84b058306472810edb4bc215cea621f1890b8b02.zip
Squash a couple pattern warnings that I missed
Diffstat (limited to 'src')
-rw-r--r--src/libcore/iter.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 77f9abe8e0b..77b9a3ce8fb 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -128,7 +128,7 @@ pure fn foldl<A,B,IA:BaseIter<A>>(self: &IA, +b0: B, blk: fn(&B, &A) -> B)
 }
 
 pure fn to_vec<A:Copy,IA:BaseIter<A>>(self: &IA) -> ~[A] {
-    foldl::<A,~[A],IA>(self, ~[], |r, a| vec::append(*r, ~[*a]))
+    foldl::<A,~[A],IA>(self, ~[], |r, a| vec::append(copy (*r), ~[*a]))
 }
 
 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) {
 pure fn min<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
     match do foldl::<A,Option<A>,IA>(self, None) |a, b| {
         match a {
-          &Some(a_) if a_ < *b => {
+          &Some(ref a_) if *a_ < *b => {
              *(move a)
           }
           _ => Some(*b)
@@ -188,7 +188,7 @@ pure fn min<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
 pure fn max<A:Copy Ord,IA:BaseIter<A>>(self: &IA) -> A {
     match do foldl::<A,Option<A>,IA>(self, None) |a, b| {
         match a {
-          &Some(a_) if a_ > *b => {
+          &Some(ref a_) if *a_ > *b => {
               *(move a)
           }
           _ => Some(*b)