as_unspecified → to_unspecified
This commit is contained in:
parent
83c41fd760
commit
a3423b35f4
|
@ -393,7 +393,7 @@ impl<'a> TcpSocket<'a> {
|
|||
// but without committing to a specific address right away.
|
||||
let local_addr = match remote_endpoint.addr {
|
||||
IpAddress::Unspecified => return Err(()),
|
||||
_ => remote_endpoint.addr.as_unspecified(),
|
||||
_ => remote_endpoint.addr.to_unspecified(),
|
||||
};
|
||||
let local_endpoint = IpEndpoint { addr: local_addr, ..local_endpoint };
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ impl Address {
|
|||
}
|
||||
|
||||
/// Return an unspecified address that has the same IP version as `self`.
|
||||
pub fn as_unspecified(&self) -> Address {
|
||||
pub fn to_unspecified(&self) -> Address {
|
||||
match self {
|
||||
&Address::Unspecified => Address::Unspecified,
|
||||
// &Address::Ipv4 => Address::Ipv4(Ipv4Address::UNSPECIFIED),
|
||||
|
@ -353,7 +353,8 @@ pub mod checksum {
|
|||
])
|
||||
},
|
||||
|
||||
_ => panic!("Unexpected pseudo header ")
|
||||
_ => panic!("Unexpected pseudo header addresses: {}, {}",
|
||||
src_addr, dst_addr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue