Skip to content

Commit

Permalink
use direct tokio exports where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Oct 30, 2022
1 parent 428914e commit 00654aa
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ ci-test = "hack --feature-powerset --exclude-features=io-uring test --lib --test
ci-test-win = "hack --feature-powerset --depth 2 --exclude-features=io-uring test --lib --tests --no-fail-fast -- --nocapture"

# test with io-uring feature
ci-test-linux = " hack --feature-powerset test --lib --tests --no-fail-fast -- --nocapture"
ci-test-linux = "hack --feature-powerset test --lib --tests --no-fail-fast -- --nocapture"
5 changes: 2 additions & 3 deletions actix-codec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Codec utilities for working with framed protocols.
//!
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and
//! [`AsyncWrite`], to framed streams implementing [`Sink`] and [`Stream`].
//! Framed streams are also known as `transports`.
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and [`AsyncWrite`], to framed
//! streams implementing [`Sink`] and [`Stream`]. Framed streams are also known as `transports`.
//!
//! [`Sink`]: futures_sink::Sink
//! [`Stream`]: futures_core::Stream
Expand Down
4 changes: 2 additions & 2 deletions actix-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
tokio-uring = { version = "0.3", optional = true }

[dev-dependencies]
actix-codec = "0.5.0"
actix-rt = "2.6.0"
actix-codec = "0.5"
actix-rt = "2.6"

bytes = "1"
env_logger = "0.9"
Expand Down
12 changes: 6 additions & 6 deletions actix-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@ accept = []
connect = []

# use openssl impls
openssl = ["tls-openssl", "tokio-openssl", "actix-codec"]
openssl = ["tls-openssl", "tokio-openssl"]

# use rustls impls
rustls = ["tokio-rustls", "webpki-roots", "actix-codec"]
rustls = ["tokio-rustls", "webpki-roots"]

# use native-tls impls
native-tls = ["tokio-native-tls", "actix-codec"]
native-tls = ["tokio-native-tls"]

# support http::Uri as connect address
uri = ["http"]

[dependencies]
actix-codec = { version = "0.5.0", optional = true }
actix-rt = { version = "2.2.0", default-features = false }
actix-service = "2"
actix-utils = "3"

futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
impl-more = "0.1"
pin-project-lite = "0.2.7"
tokio = "1.13.1"
tokio-util = "0.7"
tracing = { version = "0.1.30", default-features = false, features = ["log"] }

Expand All @@ -68,8 +68,8 @@ webpki-roots = { version = "0.22", optional = true }
tokio-native-tls = { version = "0.3", optional = true }

[dev-dependencies]
actix-codec = "0.5.0"
actix-rt = "2.2.0"
actix-codec = "0.5"
actix-rt = "2.2"
actix-server = "2"
bytes = "1"
env_logger = "0.9"
Expand Down
2 changes: 1 addition & 1 deletion actix-tls/src/accept/native_tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use std::{
time::Duration,
};

use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
use actix_rt::{
net::{ActixStream, Ready},
time::timeout,
Expand All @@ -21,6 +20,7 @@ use actix_utils::{
future::{ready, Ready as FutReady},
};
use futures_core::future::LocalBoxFuture;
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use tokio_native_tls::{native_tls::Error, TlsAcceptor};

use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};
Expand Down
2 changes: 1 addition & 1 deletion actix-tls/src/accept/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::{
time::Duration,
};

use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
use actix_rt::{
net::{ActixStream, Ready},
time::{sleep, Sleep},
Expand All @@ -23,6 +22,7 @@ use actix_utils::{
};
use openssl::ssl::{Error, Ssl, SslAcceptor};
use pin_project_lite::pin_project;
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};

use super::{TlsError, DEFAULT_TLS_HANDSHAKE_TIMEOUT, MAX_CONN_COUNTER};

Expand Down
2 changes: 1 addition & 1 deletion actix-tls/src/accept/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::{
time::Duration,
};

use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
use actix_rt::{
net::{ActixStream, Ready},
time::{sleep, Sleep},
Expand All @@ -23,6 +22,7 @@ use actix_utils::{
future::{ready, Ready as FutReady},
};
use pin_project_lite::pin_project;
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
use tokio_rustls::rustls::ServerConfig;
use tokio_rustls::{Accept, TlsAcceptor};

Expand Down

0 comments on commit 00654aa

Please sign in to comment.