mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-10 10:26:42 +00:00
Use assert
without if
-clause
This commit is contained in:
parent
b68be72763
commit
85c32ef9d2
1 changed files with 3 additions and 6 deletions
|
@ -126,12 +126,9 @@ fn flat_map_doesnt_poll_completed_inner_stream() {
|
|||
type Item = ();
|
||||
|
||||
fn poll_next(mut self: Pin<&mut Self>, _: &mut Context) -> Poll<Option<Self::Item>> {
|
||||
if !self.polled {
|
||||
self.polled = true;
|
||||
Poll::Ready(None)
|
||||
} else {
|
||||
assert!(false, "Polled after completion!");
|
||||
}
|
||||
assert!(!self.polled, "Polled after completion!");
|
||||
self.polled = true;
|
||||
Poll::Ready(None)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue