diff --git a/tonic-web/src/call.rs b/tonic-web/src/call.rs index 3e8952b9f..90cfafca9 100644 --- a/tonic-web/src/call.rs +++ b/tonic-web/src/call.rs @@ -177,9 +177,9 @@ where return Poll::Ready(Some(Ok(Frame::data(bytes)))); } - let mut this = self.as_mut().project(); + let this = self.as_mut().project(); - match ready!(this.inner.as_mut().poll_frame(cx)) { + match ready!(this.inner.poll_frame(cx)) { Some(Ok(frame)) if frame.is_data() => this .buf .put(frame.into_data().unwrap_or_else(|_| unreachable!())), @@ -217,9 +217,9 @@ where mut self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll, Status>>> { - let mut this = self.as_mut().project(); + let this = self.as_mut().project(); - match ready!(this.inner.as_mut().poll_frame(cx)) { + match ready!(this.inner.poll_frame(cx)) { Some(Ok(frame)) if frame.is_data() => { let mut data = frame.into_data().unwrap_or_else(|_| unreachable!()); let mut res = data.copy_to_bytes(data.remaining()); diff --git a/tonic-web/src/service.rs b/tonic-web/src/service.rs index e43223a36..a60a724ba 100644 --- a/tonic-web/src/service.rs +++ b/tonic-web/src/service.rs @@ -159,9 +159,9 @@ where type Output = Result, E>; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let mut this = self.project(); + let this = self.project(); - match this.case.as_mut().project() { + match this.case.project() { CaseProj::GrpcWeb { future, accept } => { let res = ready!(future.poll(cx))?; diff --git a/tonic/src/transport/server/io_stream.rs b/tonic/src/transport/server/io_stream.rs index 222970935..a0fbf83df 100644 --- a/tonic/src/transport/server/io_stream.rs +++ b/tonic/src/transport/server/io_stream.rs @@ -52,7 +52,7 @@ where where IE: Into, { - match ready!(self.as_mut().project().inner.as_mut().poll_next(cx)) { + match ready!(self.as_mut().project().inner.poll_next(cx)) { Some(Ok(io)) => Poll::Ready(Some(Ok(ServerIo::new_io(io)))), Some(Err(e)) => match handle_tcp_accept_error(e) { ControlFlow::Continue(()) => {