mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 16:21:39 +00:00
Add back the Swarm (#613)
This commit is contained in:
@ -1130,7 +1130,10 @@ where
|
||||
TOutEvent: Send + 'static,
|
||||
{
|
||||
let mut addrs = addrs.into_iter();
|
||||
let first = addrs.next().unwrap(); // TODO: bad
|
||||
let first = match addrs.next() {
|
||||
Some(f) => f,
|
||||
None => return Err(self)
|
||||
};
|
||||
let rest = addrs.collect();
|
||||
self.connect_inner(handler, first, rest)
|
||||
}
|
||||
|
Reference in New Issue
Block a user