diff --git a/tokio-xmpp/src/xmpp_stream.rs b/tokio-xmpp/src/xmpp_stream.rs index 5ed49c85..bbab0247 100644 --- a/tokio-xmpp/src/xmpp_stream.rs +++ b/tokio-xmpp/src/xmpp_stream.rs @@ -88,19 +88,28 @@ impl Sink for XMPPStream { Poll::Ready(Ok(())) } - fn start_send(#[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> { + fn start_send( + #[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, + item: Packet, + ) -> Result<(), Self::Error> { Pin::new(&mut self.stream.lock().unwrap().deref_mut()) .start_send(item) .map_err(|e| e.into()) } - fn poll_flush(#[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_flush( + #[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, + cx: &mut Context, + ) -> Poll> { Pin::new(&mut self.stream.lock().unwrap().deref_mut()) .poll_flush(cx) .map_err(|e| e.into()) } - fn poll_close(#[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_close( + #[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, + cx: &mut Context, + ) -> Poll> { Pin::new(&mut self.stream.lock().unwrap().deref_mut()) .poll_close(cx) .map_err(|e| e.into()) @@ -111,7 +120,10 @@ impl Sink for XMPPStream { impl Stream for XMPPStream { type Item = Result; - fn poll_next(#[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_next( + #[cfg_attr(rustc_least_1_48, allow(unused_mut))] mut self: Pin<&mut Self>, + cx: &mut Context, + ) -> Poll> { Pin::new(&mut self.stream.lock().unwrap().deref_mut()) .poll_next(cx) .map(|result| result.map(|result| result.map_err(|e| e.into())))