Skip to content

Commit d1ed4b8

Browse files
committed
Change _ipv6 suffix to _v6
To match the other methods.
1 parent a131ca5 commit d1ed4b8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/socket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,8 +2095,8 @@ impl Socket {
20952095
feature = "all",
20962096
any(target_os = "android", target_os = "linux", target_os = "windows")
20972097
))]
2098-
pub fn original_dst_ipv6(&self) -> io::Result<SockAddr> {
2099-
sys::original_dst_ipv6(self.as_raw())
2098+
pub fn original_dst_v6(&self) -> io::Result<SockAddr> {
2099+
sys::original_dst_v6(self.as_raw())
21002100
}
21012101
}
21022102

tests/socket.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@ fn original_dst_v4() {
16781678
feature = "all",
16791679
any(target_os = "android", target_os = "fuchsia", target_os = "linux")
16801680
))]
1681-
fn original_dst_ipv6() {
1681+
fn original_dst_v6() {
16821682
let socket = Socket::new(Domain::IPV6, Type::STREAM, None).unwrap();
16831683
#[cfg(not(target_os = "windows"))]
16841684
let expected = Some(libc::ENOENT);
@@ -1688,15 +1688,15 @@ fn original_dst_ipv6() {
16881688
let expected_v4 = Some(libc::EOPNOTSUPP);
16891689
#[cfg(target_os = "windows")]
16901690
let expected_v4 = Some(windows_sys::Win32::Networking::WinSock::WSAEINVAL);
1691-
match socket.original_dst_ipv6() {
1692-
Ok(_) => panic!("original_dst_ipv6 on non-redirected socket should fail"),
1691+
match socket.original_dst_v6() {
1692+
Ok(_) => panic!("original_dst_v6 on non-redirected socket should fail"),
16931693
Err(err) => assert_eq!(err.raw_os_error(), expected),
16941694
}
16951695

16961696
// Not supported on IPv4 socket.
16971697
let socket = Socket::new(Domain::IPV4, Type::STREAM, None).unwrap();
1698-
match socket.original_dst_ipv6() {
1699-
Ok(_) => panic!("original_dst_ipv6 on non-redirected socket should fail"),
1698+
match socket.original_dst_v6() {
1699+
Ok(_) => panic!("original_dst_v6 on non-redirected socket should fail"),
17001700
Err(err) => assert_eq!(err.raw_os_error(), expected_v4),
17011701
}
17021702
}

0 commit comments

Comments
 (0)