mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 00:01:33 +00:00
swarm: return references from external_addresses (#1008)
This commit is contained in:
committed by
Pierre Krieger
parent
9575fa6c08
commit
63e9e39538
@ -410,10 +410,9 @@ impl<'a> PollParameters<'a> {
|
||||
}
|
||||
|
||||
/// Returns the list of the addresses nodes can use to reach us.
|
||||
// TODO: should return references
|
||||
#[inline]
|
||||
pub fn external_addresses<'b>(&'b mut self) -> impl ExactSizeIterator<Item = Multiaddr> + 'b {
|
||||
self.external_addrs.iter().cloned()
|
||||
pub fn external_addresses(&self) -> impl ExactSizeIterator<Item = &Multiaddr> {
|
||||
self.external_addrs.iter()
|
||||
}
|
||||
|
||||
/// Returns the peer id of the local node.
|
||||
|
Reference in New Issue
Block a user