rust/library/std
Lzu Tao 0210fd3d73 Transmute between big endian s6_addr and [u16; 8].
The old code already made the assumption to reinterpret
`Ipv6Addr` as `[u16; 8]`.

Glibc, Linux, FreeBSD, Win32 all makes this assumption.
The main motivation of using union it to better optimize code.

ref:
* https://docs.microsoft.com/en-us/windows/win32/api/in6addr/ns-in6addr-in6_addr
* 1d6e424741/contrib/ntp/lib/isc/include/isc/ipv6.h (L63)
* 8b531aa996/include/net/net_ip.h (L137)
* https://sourceware.org/git/?p=glibc.git;a=blob;f=inet/netinet/in.h;h=f6355c7efe5192b88337b136ef687fe9a5ed648c;hb=HEAD#l216

Co-authored-by: Josh Stone <cuviper@gmail.com>
Co-authored-by: Peter Atashian <retep998@gmail.com>
2020-08-10 00:50:26 +00:00
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
src Transmute between big endian s6_addr and [u16; 8]. 2020-08-10 00:50:26 +00:00
tests mv std libs to library/ 2020-07-27 19:51:13 -05:00
build.rs std: Switch from libbacktrace to gimli 2020-07-28 16:34:01 -07:00
Cargo.toml Update hashbrown to 0.8.1 2020-08-07 07:03:12 +01:00