Skip to content

Instantly share code, notes, and snippets.

@nicolas-cherel
Created August 27, 2015 10:00
Show Gist options
  • Save nicolas-cherel/b49c3d21fc67e5d2a1d3 to your computer and use it in GitHub Desktop.
Save nicolas-cherel/b49c3d21fc67e5d2a1d3 to your computer and use it in GitHub Desktop.
rustc -o /tmp/p /dev/stdin <<CODE && /tmp/p
fn main() {
use std::net::ToSocketAddrs;
println!("{:?}", "www.google.com:80".to_socket_addrs().map(|a| a.into_iter().collect::<Vec<_>>()).unwrap())
}
CODE
[V6([2a00:1450:4007:807::1012]:80), V6([2a00:1450:4007:807::1012]:80), V4(216.58.208.228:80), V4(216.58.208.228:80)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment