From 9a377125f7614958ff7f9bbdd93d440a65c4502a Mon Sep 17 00:00:00 2001 From: tahmid-23 <60953955+tahmid-23@users.noreply.github.com> Date: Tue, 21 May 2024 13:33:27 -0400 Subject: [PATCH] fix CI --- Cargo.toml | 2 +- src/server.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4d8e7f4..d3b3219 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ exclude = ["/.github", "/examples", "/scripts"] [dependencies] tokio = "1.0" rustls = { version = "0.23.5", default-features = false, features = ["std"] } -pin-project-lite = "0.2.14" pki-types = { package = "rustls-pki-types", version = "1" } [features] @@ -35,3 +34,4 @@ futures-util = "0.3.1" lazy_static = "1.1" webpki-roots = "0.26" rustls-pemfile = "2" +pin-project-lite = "0.2.14" diff --git a/src/server.rs b/src/server.rs index 4ce4f3d..65d1bcf 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1,5 +1,4 @@ use std::io; -use std::io::Read; #[cfg(unix)] use std::os::unix::io::{AsRawFd, RawFd}; #[cfg(windows)] @@ -107,6 +106,8 @@ where cx: &mut Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll> { + use std::io::Read; + let this = self.get_mut(); let mut stream = Stream::new(&mut this.io, &mut this.session).set_eof(!this.state.readable()); @@ -144,7 +145,7 @@ where return Poll::Pending; } - return Poll::Ready(Ok(())); + Poll::Ready(Ok(())) } TlsState::ReadShutdown | TlsState::FullyShutdown => Poll::Ready(Ok(())), s => unreachable!("server TLS can not hit this state: {:?}", s),