File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ use core::{cmp, fmt};
4141use sync:: { RwLock , RwLockReadGuard } ;
4242use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
4343use sync:: Mutex ;
44- use core:: ops:: Deref ;
44+ use core:: ops:: { Bound , Deref } ;
4545use bitcoin:: hashes:: hex:: ToHex ;
4646
4747#[ cfg( feature = "std" ) ]
@@ -342,12 +342,10 @@ where C::Target: chain::Access, L::Target: Logger
342342
343343 fn get_next_node_announcement ( & self , starting_point : Option < & PublicKey > ) -> Option < NodeAnnouncement > {
344344 let nodes = self . network_graph . nodes . read ( ) . unwrap ( ) ;
345- let mut iter = if let Some ( pubkey) = starting_point {
346- let mut iter = nodes. range ( NodeId :: from_pubkey ( pubkey) ..) ;
347- iter. next ( ) ;
348- iter
345+ let iter = if let Some ( pubkey) = starting_point {
346+ nodes. range ( ( Bound :: Excluded ( NodeId :: from_pubkey ( pubkey) ) , Bound :: Unbounded ) )
349347 } else {
350- nodes. range :: < NodeId , _ > ( ..)
348+ nodes. range ( ..)
351349 } ;
352350 for ( _, ref node) in iter {
353351 if let Some ( node_info) = node. announcement_info . as_ref ( ) {
You can’t perform that action at this time.
0 commit comments