mirror of
https://git.proxmox.com/git/rustc
synced 2026-01-14 03:55:31 +00:00
30 lines
904 B
Diff
30 lines
904 B
Diff
Description: Work around #842634 on some machines, e.g. Debian porterboxes
|
|
This should remain commented-out in debian/patches/series, it's not needed everywhere
|
|
Author: Ximin Luo <infinity0@debian.org>
|
|
Forwarded: not-needed
|
|
---
|
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
--- a/src/libstd/sys_common/net.rs
|
|
+++ b/src/libstd/sys_common/net.rs
|
|
@@ -616,20 +616,3 @@
|
|
.finish()
|
|
}
|
|
}
|
|
-
|
|
-#[cfg(test)]
|
|
-mod tests {
|
|
- use super::*;
|
|
- use collections::HashMap;
|
|
-
|
|
- #[test]
|
|
- fn no_lookup_host_duplicates() {
|
|
- let mut addrs = HashMap::new();
|
|
- let lh = match lookup_host("localhost") {
|
|
- Ok(lh) => lh,
|
|
- Err(e) => panic!("couldn't resolve `localhost': {}", e)
|
|
- };
|
|
- let _na = lh.map(|sa| *addrs.entry(sa).or_insert(0) += 1).count();
|
|
- assert!(addrs.values().filter(|&&v| v > 1).count() == 0);
|
|
- }
|
|
-}
|