diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-06-21 14:09:39 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-06-21 16:11:11 -0700 |
| commit | 28ab0e8c0335544359d1809a40682f38c9610b78 (patch) | |
| tree | 16b518f1c63957f41a2b67811634cc08bed94fc8 | |
| parent | 40559ea83961df06c82f76c333ce4c9604f12449 (diff) | |
| download | rust-28ab0e8c0335544359d1809a40682f38c9610b78.tar.gz rust-28ab0e8c0335544359d1809a40682f38c9610b78.zip | |
Fixing illegal moves.
| -rw-r--r-- | src/libcore/newcomm.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libcore/newcomm.rs b/src/libcore/newcomm.rs index 6934dba84cd..24c4c1cbd9c 100644 --- a/src/libcore/newcomm.rs +++ b/src/libcore/newcomm.rs @@ -34,14 +34,8 @@ fn send<T: send>(c: chan<T>, -x: T) { (*c).with {|cond, data| let mut xx = none; xx <-> x; - alt xx { - some(y) { - let mut x <- y; - (*data).push(x); - cond.signal(); - } - none { fail } - }; + (*data).push(option::unwrap(xx)); + cond.signal(); } } |
