about summary refs log tree commit diff
path: root/src/lib/either.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-07-26 14:06:02 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-07-26 14:06:02 +0200
commitaea537779e01359cf8da6944218362d44bfaee83 (patch)
tree235edf688d4fb4928ff766c063dcac779548f34d /src/lib/either.rs
parente123366bffa69ee3877335b9ca979b0cc301d07c (diff)
downloadrust-aea537779e01359cf8da6944218362d44bfaee83.tar.gz
rust-aea537779e01359cf8da6944218362d44bfaee83.zip
Remove all uses of tuples from the compiler and stdlib
Diffstat (limited to 'src/lib/either.rs')
-rw-r--r--src/lib/either.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/either.rs b/src/lib/either.rs
index 2c175c18f36..c62a8e79fec 100644
--- a/src/lib/either.rs
+++ b/src/lib/either.rs
@@ -38,7 +38,8 @@ fn rights[T, U](&(t[T, U])[] eithers) -> U[] {
     ret result;
 }
 
-fn partition[T, U](&(t[T, U])[] eithers) -> tup(T[], U[]) {
+fn partition[T, U](&(t[T, U])[] eithers)
+    -> rec(T[] lefts, U[] rights) {
     let T[] lefts = ~[];
     let U[] rights = ~[];
     for (t[T, U] elt in eithers) {
@@ -47,7 +48,7 @@ fn partition[T, U](&(t[T, U])[] eithers) -> tup(T[], U[]) {
             case (right(?r)) { rights += ~[r] }
         }
     }
-    ret tup(lefts, rights);
+    ret rec(lefts=lefts, rights=rights);
 }
 //
 // Local Variables: