From e23c161c0a612ce627087d317f5f0baf07c5e07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 30 Aug 2020 01:56:57 +0200 Subject: [PATCH] tokio-xmpp: remove unneeded mut on self MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- tokio-xmpp/src/xmpp_stream.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio-xmpp/src/xmpp_stream.rs b/tokio-xmpp/src/xmpp_stream.rs index d9553f0d..541fcaff 100644 --- a/tokio-xmpp/src/xmpp_stream.rs +++ b/tokio-xmpp/src/xmpp_stream.rs @@ -88,19 +88,19 @@ impl Sink for XMPPStream { Poll::Ready(Ok(())) } - fn start_send(mut self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> { + fn start_send(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(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_flush(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(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_close(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 +111,7 @@ impl Sink for XMPPStream { impl Stream for XMPPStream { type Item = Result; - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_next(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())))