about summary refs log tree commit diff
path: root/library/std/src/sys_common/net/tests.rs
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2025-02-02 18:53:52 +0100
committerjoboet <jonasboettiger@icloud.com>2025-02-02 19:12:06 +0100
commit4f834264ab8d0cb95ac7972532661c84a154667e (patch)
tree8a03c78c8ca1dd14d894be5a44834492b3fd11de /library/std/src/sys_common/net/tests.rs
parent6dd75f0d6802f56564f5f9c947a85ded286d3986 (diff)
downloadrust-4f834264ab8d0cb95ac7972532661c84a154667e.tar.gz
rust-4f834264ab8d0cb95ac7972532661c84a154667e.zip
std: move network code into `sys`
As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules.

I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
Diffstat (limited to 'library/std/src/sys_common/net/tests.rs')
-rw-r--r--library/std/src/sys_common/net/tests.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/library/std/src/sys_common/net/tests.rs b/library/std/src/sys_common/net/tests.rs
deleted file mode 100644
index fc236b8027b..00000000000
--- a/library/std/src/sys_common/net/tests.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-use super::*;
-use crate::collections::HashMap;
-
-#[test]
-fn no_lookup_host_duplicates() {
-    let mut addrs = HashMap::new();
-    let lh = match LookupHost::try_from(("localhost", 0)) {
-        Ok(lh) => lh,
-        Err(e) => panic!("couldn't resolve `localhost`: {e}"),
-    };
-    for sa in lh {
-        *addrs.entry(sa).or_insert(0) += 1;
-    }
-    assert_eq!(
-        addrs.iter().filter(|&(_, &v)| v > 1).collect::<Vec<_>>(),
-        vec![],
-        "There should be no duplicate localhost entries"
-    );
-}