fix clippy
This commit is contained in:
parent
681cbe68ca
commit
163a96b062
@ -52,20 +52,17 @@ where IO: AsyncRead + AsyncWrite,
|
||||
|
||||
#[inline]
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match self {
|
||||
MidHandshake::Handshaking(stream) => {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
if let MidHandshake::Handshaking(stream) = self {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
|
||||
if stream.session.is_handshaking() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
if stream.session.is_handshaking() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
|
||||
if stream.session.wants_write() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
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,20 +48,17 @@ where IO: AsyncRead + AsyncWrite,
|
||||
|
||||
#[inline]
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
match self {
|
||||
MidHandshake::Handshaking(stream) => {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
if let MidHandshake::Handshaking(stream) = self {
|
||||
let (io, session) = stream.get_mut();
|
||||
let mut stream = Stream::new(io, session);
|
||||
|
||||
if stream.session.is_handshaking() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
if stream.session.is_handshaking() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
|
||||
if stream.session.wants_write() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
if stream.session.wants_write() {
|
||||
try_nb!(stream.complete_io());
|
||||
}
|
||||
}
|
||||
|
||||
match mem::replace(self, MidHandshake::End) {
|
||||
|
Loading…
Reference in New Issue
Block a user