diff options
| author | Linus Färnstrand <faern@faern.net> | 2020-11-03 01:08:31 +0100 |
|---|---|---|
| committer | Linus Färnstrand <faern@faern.net> | 2022-06-23 21:01:58 +0200 |
| commit | 8cd73519621513fe75b915e8c37c87f128b453dd (patch) | |
| tree | 611e71e316a5a897d63821b65f1764a454154130 /library/std/src/net/mod.rs | |
| parent | 2e6256b2431c3b3713fa33ab46f293dbd07dec93 (diff) | |
| download | rust-8cd73519621513fe75b915e8c37c87f128b453dd.tar.gz rust-8cd73519621513fe75b915e8c37c87f128b453dd.zip | |
Remove ntohs/htons in favor of to_be/from_be
Diffstat (limited to 'library/std/src/net/mod.rs')
| -rw-r--r-- | library/std/src/net/mod.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/library/std/src/net/mod.rs b/library/std/src/net/mod.rs index 9ed4a98f943..e7a40bdaf8e 100644 --- a/library/std/src/net/mod.rs +++ b/library/std/src/net/mod.rs @@ -69,15 +69,6 @@ pub enum Shutdown { Both, } -#[inline] -const fn htons(i: u16) -> u16 { - i.to_be() -} -#[inline] -const fn ntohs(i: u16) -> u16 { - u16::from_be(i) -} - fn each_addr<A: ToSocketAddrs, F, T>(addr: A, mut f: F) -> io::Result<T> where F: FnMut(io::Result<&SocketAddr>) -> io::Result<T>, |
