diff --git a/src/lib.rs b/src/lib.rs index 83ae537..bce7b44 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -388,13 +388,15 @@ where } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { - (*self).with_context(Some((ContextWaker::Write, cx)), |s| cvt(s.flush())).map(|r| { - // WebSocket connection has just been closed. Flushing completed, not an error. - match r { - Err(WsError::ConnectionClosed) => Ok(()), - other => other, - } - }) + (*self) + .with_context(Some((ContextWaker::Write, cx)), |s| cvt(s.flush())) + .map(|r| { + // WebSocket connection has just been closed. Flushing completed, not an error. + match r { + Err(WsError::ConnectionClosed) => Ok(()), + other => other, + } + }) } fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> {