Skip to content

Commit

Permalink
Uncomment to_std and from_std methods for IpAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbott99 committed Apr 9, 2019
1 parent 0059ddf commit 783aa2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#969](https://github.com/nix-rust/nix/pull/969))
- Add several errno constants from OpenBSD 6.2
([#1036](https://github.com/nix-rust/nix/pull/1036))
- Added `from_std` and `to_std` methods for `sys::socket::IpAddr`

### Changed
- `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/))
Expand Down
3 changes: 1 addition & 2 deletions src/sys/socket/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,20 +418,19 @@ impl IpAddr {
IpAddr::V6(Ipv6Addr::new(a, b, c, d, e, f, g, h))
}

/*
pub fn from_std(std: &net::IpAddr) -> IpAddr {
match *std {
net::IpAddr::V4(ref std) => IpAddr::V4(Ipv4Addr::from_std(std)),
net::IpAddr::V6(ref std) => IpAddr::V6(Ipv6Addr::from_std(std)),
}
}

pub fn to_std(&self) -> net::IpAddr {
match *self {
IpAddr::V4(ref ip) => net::IpAddr::V4(ip.to_std()),
IpAddr::V6(ref ip) => net::IpAddr::V6(ip.to_std()),
}
}
*/
}

impl fmt::Display for IpAddr {
Expand Down

0 comments on commit 783aa2e

Please sign in to comment.