diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-18 21:41:37 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-19 10:52:59 -0700 |
| commit | 9cf271fe96b474d514b1052935db70c4056cf076 (patch) | |
| tree | 7a6fb31efeaa4de91317c16aca824153aaaf988c /src/libcore/either.rs | |
| parent | 62b7f4d800325b46002c47d23b58a9f2b7fabb9b (diff) | |
| download | rust-9cf271fe96b474d514b1052935db70c4056cf076.tar.gz rust-9cf271fe96b474d514b1052935db70c4056cf076.zip | |
De-mode vec::each() and many of the str iteration routines
Note that the method foo.each() is not de-moded, nor the other vec routines.
Diffstat (limited to 'src/libcore/either.rs')
| -rw-r--r-- | src/libcore/either.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/either.rs b/src/libcore/either.rs index b97fd244940..9f58f46f1a0 100644 --- a/src/libcore/either.rs +++ b/src/libcore/either.rs @@ -34,7 +34,7 @@ fn lefts<T: Copy, U>(eithers: &[Either<T, U>]) -> ~[T] { let mut result: ~[T] = ~[]; for vec::each(eithers) |elt| { - match elt { + match *elt { Left(l) => vec::push(result, l), _ => { /* fallthrough */ } } @@ -47,7 +47,7 @@ fn rights<T, U: Copy>(eithers: &[Either<T, U>]) -> ~[U] { let mut result: ~[U] = ~[]; for vec::each(eithers) |elt| { - match elt { + match *elt { Right(r) => vec::push(result, r), _ => { /* fallthrough */ } } @@ -67,7 +67,7 @@ fn partition<T: Copy, U: Copy>(eithers: &[Either<T, U>]) let mut lefts: ~[T] = ~[]; let mut rights: ~[U] = ~[]; for vec::each(eithers) |elt| { - match elt { + match *elt { Left(l) => vec::push(lefts, l), Right(r) => vec::push(rights, r) } |
