about summary refs log tree commit diff
path: root/src/libcore/result.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:35:37 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-05 15:50:02 +0100
commit60ae1590af034755b5cb1e1e71f2240a710299a2 (patch)
tree605d11f071a776c0ca33dcfea0a774379b0880bb /src/libcore/result.rs
parent1f71a0f48d18d80ff3be6970d582c5a67f976329 (diff)
downloadrust-60ae1590af034755b5cb1e1e71f2240a710299a2.tar.gz
rust-60ae1590af034755b5cb1e1e71f2240a710299a2.zip
Switch to new param kind bound syntax
And remove support for the old syntax
Diffstat (limited to 'src/libcore/result.rs')
-rw-r--r--src/libcore/result.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 91038474ead..52af0421e58 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -37,7 +37,7 @@ Failure:
 
 If the result is an error
 */
-fn get<copy T, U>(res: t<T, U>) -> T {
+fn get<T: copy, U>(res: t<T, U>) -> T {
     alt res {
       ok(t) { t }
       err(_) {
@@ -57,7 +57,7 @@ Failure:
 
 If the result is not an error
 */
-fn get_err<T, copy U>(res: t<T, U>) -> U {
+fn get_err<T, U: copy>(res: t<T, U>) -> U {
     alt res {
       err(u) { u }
       ok(_) {
@@ -87,7 +87,7 @@ pure fn failure<T, U>(res: t<T, U>) -> bool {
     !success(res)
 }
 
-pure fn to_either<copy T, copy U>(res: t<U, T>) -> either::t<T, U> {
+pure fn to_either<T: copy, U: copy>(res: t<U, T>) -> either::t<T, U> {
     alt res {
       ok(res) { either::right(res) }
       err(fail_) { either::left(fail_) }
@@ -110,7 +110,7 @@ Example:
 > })
 
 */
-fn chain<T, copy U, copy V>(res: t<T, V>, op: block(T) -> t<U, V>)
+fn chain<T, U: copy, V: copy>(res: t<T, V>, op: block(T) -> t<U, V>)
     -> t<U, V> {
     alt res {
       ok(t) { op(t) }