Skip to content

Commit 554de0b

Browse files
committed
acceptor: replace ref mut patterns with &mut scrutinee
1 parent 8ceb157 commit 554de0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/acceptor.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ impl AsyncWrite for TlsStream {
125125
}
126126

127127
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
128-
match self.state {
128+
match &mut self.state {
129129
State::Handshaking(_) => Poll::Ready(Ok(())),
130-
State::Streaming(ref mut stream) => Pin::new(stream).poll_flush(cx),
130+
State::Streaming(stream) => Pin::new(stream).poll_flush(cx),
131131
}
132132
}
133133

134134
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
135-
match self.state {
135+
match &mut self.state {
136136
State::Handshaking(_) => Poll::Ready(Ok(())),
137-
State::Streaming(ref mut stream) => Pin::new(stream).poll_shutdown(cx),
137+
State::Streaming(stream) => Pin::new(stream).poll_shutdown(cx),
138138
}
139139
}
140140
}

0 commit comments

Comments
 (0)