1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 22:51:07 +01:00

testing: Bump up to 1.0.1

This commit is contained in:
Yuki Okushi 2020-05-19 14:08:08 +09:00
parent 2d2b0591a2
commit d0b27ee7e6
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
3 changed files with 7 additions and 3 deletions

View File

@ -1,9 +1,11 @@
# Changes
## [Unreleased]
## [1.0.1] - 2020-05-19
* Replace deprecated `net2` crate with `socket2`
* Remove unused `futures` dependency
## [1.0.0] - 2019-12-11
* Update actix-server to 1.0.0

View File

@ -1,6 +1,6 @@
[package]
name = "actix-testing"
version = "1.0.0"
version = "1.0.1"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix testing utils"
keywords = ["network", "framework", "async", "futures"]
@ -11,6 +11,7 @@ categories = ["network-programming", "asynchronous"]
license = "MIT/Apache-2.0"
edition = "2018"
workspace = ".."
readme = "README.md"
[lib]
name = "actix_testing"

View File

@ -110,7 +110,8 @@ impl TestServer {
/// Get firat available unused local address
pub fn unused_addr() -> net::SocketAddr {
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.set_reuse_address(true).unwrap();
let tcp = socket.into_tcp_listener();