Skip to content

Commit

Permalink
feat: Switch from futures to futures_util
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Mar 20, 2024
1 parent 42485cd commit 2c952e4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 57 deletions.
54 changes: 1 addition & 53 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ smallvec = "1.13.1"
memoffset = "0.9.0"
pin-project-lite = "0.2.13"
tokio = { version = "1.36.0", features = ["net", "macros", "io-util"] }
futures = "0.3.30"
ktls-sys = "1.0.1"
ktls-recvmsg = { version = "0.1.3" }
num_enum = "0.7.2"
futures-util = "0.3.30"

[dev-dependencies]
lazy_static = "1.4.0"
Expand Down
4 changes: 2 additions & 2 deletions src/cork_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ where
{
let mut rest = ReadBuf::new(&mut header_buf[*offset..]);
tracing::trace!("reading header: doing i/o");
futures::ready!(io.as_mut().poll_read(cx, &mut rest)?);
futures_util::ready!(io.as_mut().poll_read(cx, &mut rest)?);
tracing::trace!("reading header: io was ready");
*offset += rest.filled().len();
if rest.filled().is_empty() {
Expand Down Expand Up @@ -135,7 +135,7 @@ where

let just_read = {
let mut rest = buf.take(rest);
futures::ready!(io.as_mut().poll_read(cx, &mut rest)?);
futures_util::ready!(io.as_mut().poll_read(cx, &mut rest)?);

tracing::trace!("read {} bytes off of payload", rest.filled().len());
*offset += rest.filled().len();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ffi::{setup_tls_info, setup_ulp, KtlsCompatibilityError};
use futures::future::try_join_all;
use futures_util::future::try_join_all;
use ktls_sys::bindings as sys;
use rustls::{Connection, SupportedCipherSuite, SupportedProtocolVersion};

Expand Down

0 comments on commit 2c952e4

Please sign in to comment.