Rewrote receive to return a value. This lets us initialize variables by receiving them.
This commit is contained in:
parent
244efa6331
commit
200bbcf91b
4 changed files with 12 additions and 12 deletions
|
|
@ -13,8 +13,7 @@ fn send_recv() {
|
|||
let c = p.mk_chan();
|
||||
|
||||
c.send(42);
|
||||
let v = 0;
|
||||
p.recv_into(v);
|
||||
|
||||
let v = p.recv();
|
||||
log_err v;
|
||||
assert(42 == v);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue