mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 11:23:03 +00:00
Rollup merge of #83831 - AngelicosPhosphoros:issue-77583-inline-for-ip, r=m-ou-se
Add `#[inline]` to IpAddr methods Add some inlines to trivial methods of IpAddr Closes https://github.com/rust-lang/rust/issues/77583
This commit is contained in:
commit
445aa40153
@ -993,6 +993,7 @@ impl Ord for Ipv4Addr {
|
||||
}
|
||||
|
||||
impl IntoInner<c::in_addr> for Ipv4Addr {
|
||||
#[inline]
|
||||
fn into_inner(self) -> c::in_addr {
|
||||
self.inner
|
||||
}
|
||||
@ -1800,11 +1801,13 @@ impl Ord for Ipv6Addr {
|
||||
}
|
||||
|
||||
impl AsInner<c::in6_addr> for Ipv6Addr {
|
||||
#[inline]
|
||||
fn as_inner(&self) -> &c::in6_addr {
|
||||
&self.inner
|
||||
}
|
||||
}
|
||||
impl FromInner<c::in6_addr> for Ipv6Addr {
|
||||
#[inline]
|
||||
fn from_inner(addr: c::in6_addr) -> Ipv6Addr {
|
||||
Ipv6Addr { inner: addr }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user