Work around #842634 on some machines, e.g. Debian porterboxes
authorXimin Luo <infinity0@debian.org>
Thu, 6 Aug 2020 20:11:39 +0000 (21:11 +0100)
committerXimin Luo <infinity0@debian.org>
Thu, 6 Aug 2020 20:11:39 +0000 (21:11 +0100)
Forwarded: not-needed

This should remain commented-out in debian/patches/series, it's not needed everywhere
Forwarded: not-needed
Gbp-Pq: Name d-host-duplicates.patch

src/libstd/sys_common/net.rs

index 1c03bc923444873ab5b82249881a02f5a7a1b78b..7cf89d7d3dfb9b463812512fc74f826c178d52b0 100644 (file)
@@ -672,26 +672,3 @@ impl fmt::Debug for UdpSocket {
         res.field(name, &self.inner.as_inner()).finish()
     }
 }
-
-#[cfg(test)]
-mod tests {
-    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"
-        );
-    }
-}