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};
41
41
use sync:: { RwLock , RwLockReadGuard } ;
42
42
use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
43
43
use sync:: Mutex ;
44
- use core:: ops:: Deref ;
44
+ use core:: ops:: { Bound , Deref } ;
45
45
use bitcoin:: hashes:: hex:: ToHex ;
46
46
47
47
#[ cfg( feature = "std" ) ]
@@ -342,12 +342,10 @@ where C::Target: chain::Access, L::Target: Logger
342
342
343
343
fn get_next_node_announcement ( & self , starting_point : Option < & PublicKey > ) -> Option < NodeAnnouncement > {
344
344
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 ) )
349
347
} else {
350
- nodes. range :: < NodeId , _ > ( ..)
348
+ nodes. range ( ..)
351
349
} ;
352
350
for ( _, ref node) in iter {
353
351
if let Some ( node_info) = node. announcement_info . as_ref ( ) {
You can’t perform that action at this time.
0 commit comments