From ecaf9e39c9435fa2de4fe393c4b263be36eb2d99 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Mon, 6 Aug 2012 12:34:08 -0700 Subject: Convert alt to match. Stop parsing alt --- src/libcore/future.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libcore/future.rs') diff --git a/src/libcore/future.rs b/src/libcore/future.rs index 1f6b259c467..8b7b51eef58 100644 --- a/src/libcore/future.rs +++ b/src/libcore/future.rs @@ -77,7 +77,7 @@ fn from_port(-port: future_pipe::client::waiting) -> future { let mut port_ = none; port_ <-> *port; let port = option::unwrap(port_); - alt recv(port) { + match recv(port) { future_pipe::completed(data) => move_it!{data} } } @@ -119,7 +119,7 @@ fn get(future: future) -> A { fn with(future: future, blk: fn(A) -> B) -> B { //! Work with the value without copying it - let v = alt copy future.v { + let v = match copy future.v { either::left(v) => v, either::right(f) => { let v = @f(); -- cgit 1.4.1-3-g733a5