mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
update tokio verion and prep alpha3 release
This commit is contained in:
parent
5674840c01
commit
cbdbc05dbd
@ -12,6 +12,7 @@ members = [
|
|||||||
"actix-tls",
|
"actix-tls",
|
||||||
"actix-utils",
|
"actix-utils",
|
||||||
"router",
|
"router",
|
||||||
|
"string",
|
||||||
]
|
]
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
@ -27,3 +28,4 @@ actix-threadpool = { path = "actix-threadpool" }
|
|||||||
actix-tls = { path = "actix-tls" }
|
actix-tls = { path = "actix-tls" }
|
||||||
actix-utils = { path = "actix-utils" }
|
actix-utils = { path = "actix-utils" }
|
||||||
actix-router = { path = "router" }
|
actix-router = { path = "router" }
|
||||||
|
bytestring = { path = "string" }
|
||||||
|
@ -21,7 +21,6 @@ path = "src/lib.rs"
|
|||||||
bitflags = "1.2.1"
|
bitflags = "1.2.1"
|
||||||
bytes = "0.5.2"
|
bytes = "0.5.2"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
pin-project = "0.4.6"
|
tokio = { version = "0.2.3", default-features=false }
|
||||||
tokio = { version = "0.2.2", default-features=false }
|
|
||||||
tokio-util = { version = "0.2.0", default-features=false, features=["codec"] }
|
tokio-util = { version = "0.2.0", default-features=false, features=["codec"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
@ -4,7 +4,6 @@ use std::{fmt, io};
|
|||||||
|
|
||||||
use bytes::{BufMut, BytesMut};
|
use bytes::{BufMut, BytesMut};
|
||||||
use futures::{ready, Sink, Stream};
|
use futures::{ready, Sink, Stream};
|
||||||
use pin_project::pin_project;
|
|
||||||
|
|
||||||
use crate::{AsyncRead, AsyncWrite, Decoder, Encoder};
|
use crate::{AsyncRead, AsyncWrite, Decoder, Encoder};
|
||||||
|
|
||||||
@ -22,7 +21,6 @@ bitflags::bitflags! {
|
|||||||
/// the `Encoder` and `Decoder` traits to encode and decode frames.
|
/// the `Encoder` and `Decoder` traits to encode and decode frames.
|
||||||
///
|
///
|
||||||
/// You can create a `Framed` instance by using the `AsyncRead::framed` adapter.
|
/// You can create a `Framed` instance by using the `AsyncRead::framed` adapter.
|
||||||
#[pin_project]
|
|
||||||
pub struct Framed<T, U> {
|
pub struct Framed<T, U> {
|
||||||
io: T,
|
io: T,
|
||||||
codec: U,
|
codec: U,
|
||||||
@ -31,6 +29,8 @@ pub struct Framed<T, U> {
|
|||||||
write_buf: BytesMut,
|
write_buf: BytesMut,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T, U> Unpin for Framed<T, U> {}
|
||||||
|
|
||||||
impl<T, U> Framed<T, U>
|
impl<T, U> Framed<T, U>
|
||||||
where
|
where
|
||||||
T: AsyncRead + AsyncWrite,
|
T: AsyncRead + AsyncWrite,
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.2] - 2019-12-02
|
## [1.0.0-alpha.2] - 2019-12-02
|
||||||
|
|
||||||
|
@ -42,8 +42,7 @@ either = "1.5.2"
|
|||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
http = { version = "0.2.0", optional = true }
|
http = { version = "0.2.0", optional = true }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
# trust-dns-resolver = { version="0.18.0", default-features = false }
|
trust-dns-resolver = { version="0.18.0-alpha.2", default-features = false, features=["tokio"] }
|
||||||
trust-dns-resolver = { git = "https://github.com/bluejekyll/trust-dns.git" }
|
|
||||||
|
|
||||||
# openssl
|
# openssl
|
||||||
open-ssl = { version="0.10", package = "openssl", optional = true }
|
open-ssl = { version="0.10", package = "openssl", optional = true }
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [0.3.0-alpha.3] - 2019-12-xx
|
## [0.3.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
## [0.3.0-alpha.2] - 2019-12-02
|
## [0.3.0-alpha.2] - 2019-12-02
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
|
|
||||||
## [1.0.0-alpha.2] - 2019-12-02
|
## [1.0.0-alpha.2] - 2019-12-02
|
||||||
|
@ -22,4 +22,4 @@ actix-macros = "0.1.0-alpha.1"
|
|||||||
actix-threadpool = "0.3"
|
actix-threadpool = "0.3"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
copyless = "0.1.4"
|
copyless = "0.1.4"
|
||||||
tokio = { version = "0.2.2", default-features=false, features = ["rt-core", "rt-util", "io-driver", "tcp", "uds", "udp", "time", "signal", "stream"] }
|
tokio = { version = "0.2.3", default-features=false, features = ["rt-core", "rt-util", "io-driver", "tcp", "uds", "udp", "time", "signal", "stream"] }
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -76,11 +76,10 @@ fn test_start() {
|
|||||||
let addr = unused_addr();
|
let addr = unused_addr();
|
||||||
let (tx, rx) = mpsc::channel();
|
let (tx, rx) = mpsc::channel();
|
||||||
|
|
||||||
let _ = thread::spawn(move || {
|
let h = thread::spawn(move || {
|
||||||
let sys = actix_rt::System::new("test");
|
let sys = actix_rt::System::new("test");
|
||||||
let srv: Server = Server::build()
|
let srv: Server = Server::build()
|
||||||
.backlog(100)
|
.backlog(100)
|
||||||
.workers(1)
|
|
||||||
.disable_signals()
|
.disable_signals()
|
||||||
.bind("test", addr, move || {
|
.bind("test", addr, move || {
|
||||||
service_fn(|io: TcpStream| {
|
service_fn(|io: TcpStream| {
|
||||||
@ -132,7 +131,7 @@ fn test_start() {
|
|||||||
|
|
||||||
thread::sleep(time::Duration::from_millis(100));
|
thread::sleep(time::Duration::from_millis(100));
|
||||||
let _ = sys.stop();
|
let _ = sys.stop();
|
||||||
// let _ = h.join();
|
let _ = h.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-06
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ where
|
|||||||
{
|
{
|
||||||
A(#[pin] A::Future, Option<Cell<B>>),
|
A(#[pin] A::Future, Option<Cell<B>>),
|
||||||
B(#[pin] B::Future),
|
B(#[pin] B::Future),
|
||||||
Empty
|
Empty,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<A, B> Future for ThenServiceResponse<A, B>
|
impl<A, B> Future for ThenServiceResponse<A, B>
|
||||||
@ -111,7 +111,7 @@ where
|
|||||||
this.state.set(State::Empty);
|
this.state.set(State::Empty);
|
||||||
r
|
r
|
||||||
}),
|
}),
|
||||||
State::Empty => panic!("future must not be polled after it returned `Poll::Ready`")
|
State::Empty => panic!("future must not be polled after it returned `Poll::Ready`"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
## [1.0.0-alpha.2] - 2019-12-02
|
## [1.0.0-alpha.2] - 2019-12-02
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
[1.0.0-alpha.3] - 2019-12-xx
|
[1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
* Enable rustls acceptor service
|
* Enable rustls acceptor service
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [1.0.0-alpha.3] - 2019-12-xx
|
## [1.0.0-alpha.3] - 2019-12-07
|
||||||
|
|
||||||
* Migrate to `tokio=0.2.2`
|
* Migrate to tokio 0.2
|
||||||
|
|
||||||
* Fix oneshot
|
* Fix oneshot
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ mod tests {
|
|||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn test_timeout() {
|
async fn test_timeout() {
|
||||||
let resolution = Duration::from_millis(100);
|
let resolution = Duration::from_millis(100);
|
||||||
let wait_time = Duration::from_millis(150);
|
let wait_time = Duration::from_millis(500);
|
||||||
|
|
||||||
let mut timeout = TimeoutService::new(resolution, SleepService(wait_time));
|
let mut timeout = TimeoutService::new(resolution, SleepService(wait_time));
|
||||||
assert_eq!(timeout.call(()).await, Err(TimeoutError::Timeout));
|
assert_eq!(timeout.call(()).await, Err(TimeoutError::Timeout));
|
||||||
@ -225,7 +225,7 @@ mod tests {
|
|||||||
#[actix_rt::test]
|
#[actix_rt::test]
|
||||||
async fn test_timeout_newservice() {
|
async fn test_timeout_newservice() {
|
||||||
let resolution = Duration::from_millis(100);
|
let resolution = Duration::from_millis(100);
|
||||||
let wait_time = Duration::from_millis(150);
|
let wait_time = Duration::from_millis(500);
|
||||||
|
|
||||||
let timeout = apply(
|
let timeout = apply(
|
||||||
Timeout::new(resolution),
|
Timeout::new(resolution),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## [0.2.0] - 2019-12-05
|
## [0.2.0] - 2019-12-07
|
||||||
|
|
||||||
* Update http to 0.2
|
* Update http to 0.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user