From f6cb4a8080b254439c3c453b4251e1916fca5a7f Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 25 Dec 2020 02:25:17 +0100 Subject: [PATCH] tokio-xmpp: rustfmt --- tokio-xmpp/src/xmpp_stream.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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())))