Skip to content

Commit 00654aa

Browse files
committed
use direct tokio exports where possible
1 parent 428914e commit 00654aa

File tree

7 files changed

+14
-15
lines changed

7 files changed

+14
-15
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ ci-test = "hack --feature-powerset --exclude-features=io-uring test --lib --test
2020
ci-test-win = "hack --feature-powerset --depth 2 --exclude-features=io-uring test --lib --tests --no-fail-fast -- --nocapture"
2121

2222
# test with io-uring feature
23-
ci-test-linux = " hack --feature-powerset test --lib --tests --no-fail-fast -- --nocapture"
23+
ci-test-linux = "hack --feature-powerset test --lib --tests --no-fail-fast -- --nocapture"

actix-codec/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//! Codec utilities for working with framed protocols.
22
//!
3-
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and
4-
//! [`AsyncWrite`], to framed streams implementing [`Sink`] and [`Stream`].
5-
//! Framed streams are also known as `transports`.
3+
//! Contains adapters to go from streams of bytes, [`AsyncRead`] and [`AsyncWrite`], to framed
4+
//! streams implementing [`Sink`] and [`Stream`]. Framed streams are also known as `transports`.
65
//!
76
//! [`Sink`]: futures_sink::Sink
87
//! [`Stream`]: futures_core::Stream

actix-server/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ tracing = { version = "0.1.30", default-features = false, features = ["log"] }
4040
tokio-uring = { version = "0.3", optional = true }
4141

4242
[dev-dependencies]
43-
actix-codec = "0.5.0"
44-
actix-rt = "2.6.0"
43+
actix-codec = "0.5"
44+
actix-rt = "2.6"
4545

4646
bytes = "1"
4747
env_logger = "0.9"

actix-tls/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ accept = []
3030
connect = []
3131

3232
# use openssl impls
33-
openssl = ["tls-openssl", "tokio-openssl", "actix-codec"]
33+
openssl = ["tls-openssl", "tokio-openssl"]
3434

3535
# use rustls impls
36-
rustls = ["tokio-rustls", "webpki-roots", "actix-codec"]
36+
rustls = ["tokio-rustls", "webpki-roots"]
3737

3838
# use native-tls impls
39-
native-tls = ["tokio-native-tls", "actix-codec"]
39+
native-tls = ["tokio-native-tls"]
4040

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

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

5049
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
5150
impl-more = "0.1"
5251
pin-project-lite = "0.2.7"
52+
tokio = "1.13.1"
5353
tokio-util = "0.7"
5454
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
5555

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

7070
[dev-dependencies]
71-
actix-codec = "0.5.0"
72-
actix-rt = "2.2.0"
71+
actix-codec = "0.5"
72+
actix-rt = "2.2"
7373
actix-server = "2"
7474
bytes = "1"
7575
env_logger = "0.9"

actix-tls/src/accept/native_tls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use std::{
1010
time::Duration,
1111
};
1212

13-
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
1413
use actix_rt::{
1514
net::{ActixStream, Ready},
1615
time::timeout,
@@ -21,6 +20,7 @@ use actix_utils::{
2120
future::{ready, Ready as FutReady},
2221
};
2322
use futures_core::future::LocalBoxFuture;
23+
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
2424
use tokio_native_tls::{native_tls::Error, TlsAcceptor};
2525

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

actix-tls/src/accept/openssl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use std::{
1111
time::Duration,
1212
};
1313

14-
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
1514
use actix_rt::{
1615
net::{ActixStream, Ready},
1716
time::{sleep, Sleep},
@@ -23,6 +22,7 @@ use actix_utils::{
2322
};
2423
use openssl::ssl::{Error, Ssl, SslAcceptor};
2524
use pin_project_lite::pin_project;
25+
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
2626

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

actix-tls/src/accept/rustls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::{
1212
time::Duration,
1313
};
1414

15-
use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
1615
use actix_rt::{
1716
net::{ActixStream, Ready},
1817
time::{sleep, Sleep},
@@ -23,6 +22,7 @@ use actix_utils::{
2322
future::{ready, Ready as FutReady},
2423
};
2524
use pin_project_lite::pin_project;
25+
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
2626
use tokio_rustls::rustls::ServerConfig;
2727
use tokio_rustls::{Accept, TlsAcceptor};
2828

0 commit comments

Comments
 (0)