Revert "tokio-xmpp: remove unneeded mut on self"
This reverts commit e23c161c0a
. It broke
compilation on Rustc 1.45.
This commit is contained in:
parent
f34897b198
commit
439a09122a
1 changed files with 4 additions and 4 deletions
|
@ -88,19 +88,19 @@ impl<S: AsyncRead + AsyncWrite + Unpin> Sink<Packet> for XMPPStream<S> {
|
||||||
Poll::Ready(Ok(()))
|
Poll::Ready(Ok(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start_send(self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> {
|
fn start_send(mut self: Pin<&mut Self>, item: Packet) -> Result<(), Self::Error> {
|
||||||
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
||||||
.start_send(item)
|
.start_send(item)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
||||||
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
||||||
.poll_flush(cx)
|
.poll_flush(cx)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_close(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
|
||||||
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
||||||
.poll_close(cx)
|
.poll_close(cx)
|
||||||
.map_err(|e| e.into())
|
.map_err(|e| e.into())
|
||||||
|
@ -111,7 +111,7 @@ impl<S: AsyncRead + AsyncWrite + Unpin> Sink<Packet> for XMPPStream<S> {
|
||||||
impl<S: AsyncRead + AsyncWrite + Unpin> Stream for XMPPStream<S> {
|
impl<S: AsyncRead + AsyncWrite + Unpin> Stream for XMPPStream<S> {
|
||||||
type Item = Result<Packet, crate::Error>;
|
type Item = Result<Packet, crate::Error>;
|
||||||
|
|
||||||
fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
|
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
|
||||||
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
Pin::new(&mut self.stream.lock().unwrap().deref_mut())
|
||||||
.poll_next(cx)
|
.poll_next(cx)
|
||||||
.map(|result| result.map(|result| result.map_err(|e| e.into())))
|
.map(|result| result.map(|result| result.map_err(|e| e.into())))
|
||||||
|
|
Loading…
Reference in a new issue