mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 18:21:33 +00:00
core/src/connections: Avoid call to contains twice (#2279)
This commit is contained in:
@ -264,8 +264,7 @@ where
|
||||
Poll::Ready(Some(Ok(ListenerEvent::NewAddress(a)))) => {
|
||||
if listener_project.addresses.contains(&a) {
|
||||
debug!("Transport has reported address {} multiple times", a)
|
||||
}
|
||||
if !listener_project.addresses.contains(&a) {
|
||||
} else {
|
||||
listener_project.addresses.push(a.clone());
|
||||
}
|
||||
let id = *listener_project.id;
|
||||
|
Reference in New Issue
Block a user