Skip to content

Commit 72b0fd5

Browse files
authored
chore: Remove unused mutability (#2183)
1 parent 8ee85fc commit 72b0fd5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tonic-web/src/call.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ where
177177
return Poll::Ready(Some(Ok(Frame::data(bytes))));
178178
}
179179

180-
let mut this = self.as_mut().project();
180+
let this = self.as_mut().project();
181181

182-
match ready!(this.inner.as_mut().poll_frame(cx)) {
182+
match ready!(this.inner.poll_frame(cx)) {
183183
Some(Ok(frame)) if frame.is_data() => this
184184
.buf
185185
.put(frame.into_data().unwrap_or_else(|_| unreachable!())),
@@ -217,9 +217,9 @@ where
217217
mut self: Pin<&mut Self>,
218218
cx: &mut Context<'_>,
219219
) -> Poll<Option<Result<Frame<Bytes>, Status>>> {
220-
let mut this = self.as_mut().project();
220+
let this = self.as_mut().project();
221221

222-
match ready!(this.inner.as_mut().poll_frame(cx)) {
222+
match ready!(this.inner.poll_frame(cx)) {
223223
Some(Ok(frame)) if frame.is_data() => {
224224
let mut data = frame.into_data().unwrap_or_else(|_| unreachable!());
225225
let mut res = data.copy_to_bytes(data.remaining());

tonic-web/src/service.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ where
159159
type Output = Result<Response<Body>, E>;
160160

161161
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
162-
let mut this = self.project();
162+
let this = self.project();
163163

164-
match this.case.as_mut().project() {
164+
match this.case.project() {
165165
CaseProj::GrpcWeb { future, accept } => {
166166
let res = ready!(future.poll(cx))?;
167167

tonic/src/transport/server/io_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ where
5252
where
5353
IE: Into<crate::BoxError>,
5454
{
55-
match ready!(self.as_mut().project().inner.as_mut().poll_next(cx)) {
55+
match ready!(self.as_mut().project().inner.poll_next(cx)) {
5656
Some(Ok(io)) => Poll::Ready(Some(Ok(ServerIo::new_io(io)))),
5757
Some(Err(e)) => match handle_tcp_accept_error(e) {
5858
ControlFlow::Continue(()) => {

0 commit comments

Comments
 (0)