Fixing illegal moves.
This commit is contained in:
parent
40559ea839
commit
28ab0e8c03
1 changed files with 2 additions and 8 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue