swarm: Extend NetworkBehaviour callbacks. (#2011)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
David Craven
2021-03-24 17:21:53 +01:00
committed by GitHub
parent be2fb4ea8a
commit 7779b8e2c1
9 changed files with 155 additions and 49 deletions

View File

@ -187,7 +187,7 @@ where
///
/// The translation is transport-specific. See [`Transport::address_translation`].
pub fn address_translation<'a>(&'a self, observed_addr: &'a Multiaddr)
-> impl Iterator<Item = Multiaddr> + 'a
-> Vec<Multiaddr>
where
TMuxer: 'a,
THandler: 'a,
@ -201,7 +201,7 @@ where
addrs.sort_unstable();
addrs.dedup();
addrs.into_iter()
addrs
}
/// Returns the peer id of the local node.