Skip to content

Commit

Permalink
fix poll-after-completion test
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Giersch committed May 3, 2023
1 parent 8e72e87 commit 8683166
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,9 @@ mod tests {

core::future::poll_fn(|cx| {
assert!(fut.as_mut().poll(cx).is_ready());
assert!(fut.as_mut().poll(cx).is_pending());
// polling again after completion, works in this case, but might
// cause a Waker leak under other circumstances.
assert!(fut.as_mut().poll(cx).is_ready());
Poll::Ready(())
})
.await;
Expand Down

0 comments on commit 8683166

Please sign in to comment.