Skip to content

Commit

Permalink
fix: fmt issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jsydliuqing committed Feb 25, 2024
1 parent 3ad7cd4 commit c598130
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ fn local_ip_impl(family: RtAddrFamily) -> Result<IpAddr, Error> {

match local_ip_impl_route(family, &mut netlink_socket) {
Ok(ip_addr) => Ok(ip_addr),
Err(error) if error == Error::LocalIpAddressNotFound => {
local_ip_impl_addr(family, &mut netlink_socket)
}
Err(Error::LocalIpAddressNotFound) => local_ip_impl_addr(family, &mut netlink_socket),
Err(e) => Err(e),
}
}
Expand Down

0 comments on commit c598130

Please sign in to comment.