(mut self: Pin<&mut Self>, cx: &mut Context<'_>)
| 788 | } |
| 789 | |
| 790 | fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { |
| 791 | let mut this = self.as_mut().project(); |
| 792 | |
| 793 | let res_a = this.sink_a.poll_flush(cx); |
| 794 | let res_b = match *this.sink_b_state { |
| 795 | SinkState::Err => { |
| 796 | // Skip this sink now. |
| 797 | Poll::Ready(Ok(())) |
| 798 | } |
| 799 | _ => this.sink_b.poll_flush(cx), |
| 800 | }; |
| 801 | |
| 802 | match (res_a, res_b) { |
| 803 | (Poll::Ready(Ok(())), Poll::Ready(Ok(()))) => Poll::Ready(Ok(())), |
| 804 | (Poll::Ready(Err(err)), _) => Poll::Ready(Err(err)), |
| 805 | (res_a, Poll::Ready(Err(_err))) => { |
| 806 | eprintln!("sink b -> err"); |
| 807 | *this.sink_b_state = SinkState::Err; |
| 808 | res_a |
| 809 | } |
| 810 | (Poll::Pending, _) | (_, Poll::Pending) => Poll::Pending, |
| 811 | } |
| 812 | } |
| 813 | |
| 814 | fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { |
| 815 | let mut this = self.as_mut().project(); |
nothing calls this directly
no outgoing calls
no test coverage detected