diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-06 12:34:08 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-06 15:36:30 -0700 |
| commit | ecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch) | |
| tree | 775f69be65adff65551d96173dd797e32e2c3157 /src/libcore/future.rs | |
| parent | d3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff) | |
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libcore/future.rs')
| -rw-r--r-- | src/libcore/future.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<A:send>(-port: future_pipe::client::waiting<A>) -> future<A> { 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<A:copy>(future: future<A>) -> A { fn with<A,B>(future: future<A>, 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(); |
