fix clippy
This commit is contained in:
parent
681cbe68ca
commit
163a96b062
@ -52,8 +52,7 @@ where IO: AsyncRead + AsyncWrite,
|
||||
|
||||
#[inline]
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match self {
|
||||
MidHandshake::Handshaking(stream) => {
|
||||
if let MidHandshake::Handshaking(stream) = self {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
|
||||
@ -64,8 +63,6 @@ where IO: AsyncRead + AsyncWrite,
|
||||
if stream.session.wants_write() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
||||
match mem::replace(self, MidHandshake::End) {
|
||||
|
@ -84,8 +84,8 @@ impl<'a, IO: AsyncRead + AsyncWrite, S: Session> WriteTls<'a, IO, S> for Stream<
|
||||
}
|
||||
}
|
||||
|
||||
let mut vecbuf = V(self.io);
|
||||
self.session.writev_tls(&mut vecbuf)
|
||||
let mut vecio = V(self.io);
|
||||
self.session.writev_tls(&mut vecio)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ impl<'a, 'b> Buf for VecBuf<'a, 'b> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(needless_range_loop))]
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
fn bytes_vec<'c>(&'c self, dst: &mut [&'c IoVec]) -> usize {
|
||||
let len = cmp::min(self.inner.len() - self.pos, dst.len());
|
||||
|
||||
|
@ -48,8 +48,7 @@ where IO: AsyncRead + AsyncWrite,
|
||||
|
||||
#[inline]
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match self {
|
||||
MidHandshake::Handshaking(stream) => {
|
||||
if let MidHandshake::Handshaking(stream) = self {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
|
||||
@ -60,8 +59,6 @@ where IO: AsyncRead + AsyncWrite,
|
||||
if stream.session.wants_write() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
||||
match mem::replace(self, MidHandshake::End) {
|
||||
|
Loading…
Reference in New Issue
Block a user