Skip to content

Commit

Permalink
clippy: fix implied iterator bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Dec 4, 2023
1 parent 3e7f9df commit 6bfcde2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zebra-network/src/address_book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ impl AddressBook {
/// Return an iterator over all peers.
///
/// Returns peers in reconnection attempt order, including recently connected peers.
pub fn peers(&'_ self) -> impl Iterator<Item = MetaAddr> + DoubleEndedIterator + '_ {
pub fn peers(&'_ self) -> impl DoubleEndedIterator<Item = MetaAddr> + '_ {
let _guard = self.span.enter();
self.by_addr.descending_values().cloned()
}
Expand Down Expand Up @@ -590,7 +590,7 @@ impl AddressBook {
&'_ self,
instant_now: Instant,
chrono_now: chrono::DateTime<Utc>,
) -> impl Iterator<Item = MetaAddr> + DoubleEndedIterator + '_ {
) -> impl DoubleEndedIterator<Item = MetaAddr> + '_ {
let _guard = self.span.enter();

// Skip live peers, and peers pending a reconnect attempt.
Expand All @@ -609,7 +609,7 @@ impl AddressBook {
pub fn state_peers(
&'_ self,
state: PeerAddrState,
) -> impl Iterator<Item = MetaAddr> + DoubleEndedIterator + '_ {
) -> impl DoubleEndedIterator<Item = MetaAddr> + '_ {
let _guard = self.span.enter();

self.by_addr
Expand All @@ -624,7 +624,7 @@ impl AddressBook {
&'_ self,
instant_now: Instant,
chrono_now: chrono::DateTime<Utc>,
) -> impl Iterator<Item = MetaAddr> + DoubleEndedIterator + '_ {
) -> impl DoubleEndedIterator<Item = MetaAddr> + '_ {
let _guard = self.span.enter();

self.by_addr
Expand Down

0 comments on commit 6bfcde2

Please sign in to comment.