diff options
author | Alan Somers <asomers@gmail.com> | 2022-03-21 21:39:25 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2022-03-22 21:09:52 -0600 |
commit | fbeabf3730e42ae062a3ddeaa4b28134fdb8e0f6 (patch) | |
tree | d7373b0ee270efa948a11491849e7251269f16d5 /test | |
parent | 0fe668265f08c134a93bf682ac9349dc743bce00 (diff) | |
download | nix-fbeabf3730e42ae062a3ddeaa4b28134fdb8e0f6.zip |
Deprecate IpAddr, Ipv4Addr, and Ipv6Addr
Because they're redundant with types in the standard library.
Fixes #1681
Diffstat (limited to 'test')
-rw-r--r-- | test/sys/test_socket.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sys/test_socket.rs b/test/sys/test_socket.rs index e03edc3b..c18442fd 100644 --- a/test/sys/test_socket.rs +++ b/test/sys/test_socket.rs @@ -1833,7 +1833,7 @@ mod linux_errqueue { if let Some(origin) = err_addr { // Validate that our network error originated from 127.0.0.1:0. assert_eq!(origin.sin_family, AddressFamily::Inet as _); - assert_eq!(Ipv4Addr(origin.sin_addr), Ipv4Addr::new(127, 0, 0, 1)); + assert_eq!(origin.sin_addr.s_addr, u32::from_be(0x7f000001)); assert_eq!(origin.sin_port, 0); } else { panic!("Expected some error origin"); @@ -1877,8 +1877,8 @@ mod linux_errqueue { // Validate that our network error originated from localhost:0. assert_eq!(origin.sin6_family, AddressFamily::Inet6 as _); assert_eq!( - Ipv6Addr(origin.sin6_addr), - Ipv6Addr::from_std(&"::1".parse().unwrap()), + origin.sin6_addr.s6_addr, + std::net::Ipv6Addr::LOCALHOST.octets() ); assert_eq!(origin.sin6_port, 0); } else { |