These are chat archives for rust-lang/rust

15th
Nov 2017
Aleksey Kladov
@matklad
Nov 15 2017 07:11
You aren't moving Self inside the closure, you are moving only &mut Self, that is, a pointer.
Moggers
@Moggers
Nov 15 2017 10:11
I was using SocketAddr::from_str and just discovered that it doesn't do domain lookups
what should I use?
url::Url?
Michal 'vorner' Vaner
@vorner
Nov 15 2017 10:13
@Moggers This might be related to what you want: https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html. I guess the problem with lookup is that you can get multiple addresses back.
Moggers
@Moggers
Nov 15 2017 10:23
that sounds like it
whats the issue with multiple addresses? Can't I just grab the first one
or error out with "multiple addresses, might be unsafe" if I get more than one
Bradley Weston
@bweston92
Nov 15 2017 10:25
@Moggers well if one is unresponsive try the next one
Moggers
@Moggers
Nov 15 2017 10:25
well, it sounds dangerous to try hitting multiple servers asking "hey are you the redis server I'm looking for? :)"
if I somehow end up resolving to something else
Bradley Weston
@bweston92
Nov 15 2017 10:26
Depends if you have a multi master cluster then you could use any of them
Moggers
@Moggers
Nov 15 2017 10:41
wouldnt I need to build some kind of load balancing in rust then D:
Michal 'vorner' Vaner
@vorner
Nov 15 2017 11:36
Multiple addresses might be IPv4 and IPv6 of the same machine, for example.
It's just basic nature of DNS that you can get multiple. So the APIs need to reflect that. You can grab the first one of that iterator if you want to.
Moggers
@Moggers
Nov 15 2017 11:56
I just caused rustc to panic O.o
on nightly
Cengiz Can
@cengizIO
Nov 15 2017 16:19
@Moggers what's the backtrace? can you share it with me?
Jonas Platte
@jplatte
Nov 15 2017 22:05
Hey, does somebody know a decent itertools-less replacement for someIteratorOfDisplayableThings.join(", ")?