Fix issue in receiver_try_iter test where response sender would panic instead of break from the loop
This commit is contained in:
parent
aed2e5c1e5
commit
05af033b7f
1 changed files with 3 additions and 3 deletions
|
@ -1854,8 +1854,6 @@ mod tests {
|
|||
for x in response_rx.try_iter() {
|
||||
count += x;
|
||||
if count == 6 {
|
||||
drop(response_rx);
|
||||
drop(request_tx);
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
@ -1864,7 +1862,9 @@ mod tests {
|
|||
});
|
||||
|
||||
for _ in request_rx.iter() {
|
||||
response_tx.send(2).unwrap();
|
||||
if response_tx.send(2).is_err() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
assert_eq!(t.join().unwrap(), 6);
|
||||
|
|
Loading…
Add table
Reference in a new issue