(mut self: Pin<&mut Self>, cx: &mut Context<'_>)
| 73 | type Output = (); |
| 74 | |
| 75 | fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> { |
| 76 | if self.0 == 0 { |
| 77 | Poll::Ready(()) |
| 78 | } else { |
| 79 | self.0 -= 1; |
| 80 | cx.waker().wake_by_ref(); |
| 81 | Poll::Pending |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | #[cfg(test)] |