Skip to content

Commit

Permalink
Auto merge of #131715 - tgross35:add-const_sockaddr_setters, r=Amanieu
Browse files Browse the repository at this point in the history
Add an unstable `const_sockaddr_setters` feature

Unstably add `const` to the `sockaddr_setters` methods. Included API:

```rust
// core::net

impl SocketAddr {
    pub const fn set_ip(&mut self, new_ip: IpAddr);
    pub const fn set_port(&mut self, new_port: u16);
}

impl SocketAddrV4 {
    pub const fn set_ip(&mut self, new_ip: Ipv4Addr);
    pub const fn set_port(&mut self, new_port: u16);
}

impl SocketAddrV6 {
    pub const fn set_ip(&mut self, new_ip: Ipv6Addr);
    pub const fn set_port(&mut self, new_port: u16);
}
```

Tracking issue: <rust-lang/rust#131714>
  • Loading branch information
bors committed Oct 26, 2024
2 parents e3b428c + 1b9e2cb commit fa1eaea
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit fa1eaea

Please sign in to comment.