Fix async assertion in test_sendable_future
This commit is contained in:
parent
8ab6fce95e
commit
3dc32a1ded
1 changed files with 3 additions and 2 deletions
|
@ -201,12 +201,13 @@ mod test {
|
|||
#[test]
|
||||
fn test_sendable_future() {
|
||||
let expected = "schlorf";
|
||||
let (tx, rx) = channel();
|
||||
let f = Future::spawn(proc() { expected });
|
||||
task::spawn(proc() {
|
||||
let mut f = f;
|
||||
let actual = f.get();
|
||||
assert_eq!(actual, expected);
|
||||
tx.send(f.get());
|
||||
});
|
||||
assert_eq!(rx.recv(), expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue