1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 08:07:18 +00:00

http-test: Bump up to 2.0.0-alpha.1

This commit is contained in:
Yuki Okushi 2020-05-22 13:54:17 +09:00
parent 0348114ad8
commit 905f86b540
No known key found for this signature in database
GPG key ID: B0986C85C0E2DAA1
3 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# Changes # Changes
## [Unreleased] - 2020-xx-xx ## [2.0.0-alpha.1] - 2020-05-22
* Update the `time` dependency to 0.2.7 * Update the `time` dependency to 0.2.7
* Update `actix-connect` dependency to 2.0.0-alpha.2 * Update `actix-connect` dependency to 2.0.0-alpha.2

View file

@ -1,6 +1,6 @@
[package] [package]
name = "actix-http-test" name = "actix-http-test"
version = "1.0.0" version = "2.0.0-alpha.1"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix http test server" description = "Actix http test server"
readme = "README.md" readme = "README.md"

View file

@ -104,7 +104,8 @@ pub async fn test_server<F: ServiceFactory<TcpStream>>(factory: F) -> TestServer
/// Get first available unused address /// Get first available unused address
pub fn unused_addr() -> net::SocketAddr { pub fn unused_addr() -> net::SocketAddr {
let addr: net::SocketAddr = "127.0.0.1:0".parse().unwrap(); let addr: net::SocketAddr = "127.0.0.1:0".parse().unwrap();
let socket = Socket::new(Domain::ipv4(), Type::stream(), Some(Protocol::tcp())).unwrap(); let socket =
Socket::new(Domain::ipv4(), Type::stream(), Some(Protocol::tcp())).unwrap();
socket.bind(&addr.into()).unwrap(); socket.bind(&addr.into()).unwrap();
socket.set_reuse_address(true).unwrap(); socket.set_reuse_address(true).unwrap();
let tcp = socket.into_tcp_listener(); let tcp = socket.into_tcp_listener();