@@ -16,12 +16,11 @@ use ln::msgs;
16
16
use util:: ser:: { Writeable , Readable , Writer } ;
17
17
use util:: logger:: Logger ;
18
18
19
- use std:: cmp;
19
+ use std:: { cmp, fmt } ;
20
20
use std:: sync:: RwLock ;
21
21
use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
22
22
use std:: collections:: BTreeMap ;
23
23
use std:: collections:: btree_map:: Entry as BtreeEntry ;
24
- use std;
25
24
use std:: ops:: Deref ;
26
25
27
26
/// Receives and validates network updates from peers,
@@ -224,8 +223,8 @@ pub struct DirectionalChannelInfo {
224
223
pub last_update_message : Option < msgs:: ChannelUpdate > ,
225
224
}
226
225
227
- impl std :: fmt:: Display for DirectionalChannelInfo {
228
- fn fmt ( & self , f : & mut std :: fmt:: Formatter ) -> Result < ( ) , std :: fmt:: Error > {
226
+ impl fmt:: Display for DirectionalChannelInfo {
227
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
229
228
write ! ( f, "last_update {}, enabled {}, cltv_expiry_delta {}, htlc_minimum_msat {}, fees {:?}" , self . last_update, self . enabled, self . cltv_expiry_delta, self . htlc_minimum_msat, self . fees) ?;
230
229
Ok ( ( ) )
231
230
}
@@ -261,8 +260,8 @@ pub struct ChannelInfo {
261
260
pub announcement_message : Option < msgs:: ChannelAnnouncement > ,
262
261
}
263
262
264
- impl std :: fmt:: Display for ChannelInfo {
265
- fn fmt ( & self , f : & mut std :: fmt:: Formatter ) -> Result < ( ) , std :: fmt:: Error > {
263
+ impl fmt:: Display for ChannelInfo {
264
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
266
265
write ! ( f, "features: {}, node_one: {}, one_to_two: {:?}, node_two: {}, two_to_one: {:?}" ,
267
266
log_bytes!( self . features. encode( ) ) , log_pubkey!( self . node_one) , self . one_to_two, log_pubkey!( self . node_two) , self . two_to_one) ?;
268
267
Ok ( ( ) )
@@ -389,8 +388,8 @@ pub struct NodeInfo {
389
388
pub announcement_info : Option < NodeAnnouncementInfo >
390
389
}
391
390
392
- impl std :: fmt:: Display for NodeInfo {
393
- fn fmt ( & self , f : & mut std :: fmt:: Formatter ) -> Result < ( ) , std :: fmt:: Error > {
391
+ impl fmt:: Display for NodeInfo {
392
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
394
393
write ! ( f, "lowest_inbound_channel_fees: {:?}, channels: {:?}, announcement_info: {:?}" ,
395
394
self . lowest_inbound_channel_fees, & self . channels[ ..] , self . announcement_info) ?;
396
395
Ok ( ( ) )
@@ -474,8 +473,8 @@ impl Readable for NetworkGraph {
474
473
}
475
474
}
476
475
477
- impl std :: fmt:: Display for NetworkGraph {
478
- fn fmt ( & self , f : & mut std :: fmt:: Formatter ) -> Result < ( ) , std :: fmt:: Error > {
476
+ impl fmt:: Display for NetworkGraph {
477
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
479
478
write ! ( f, "Network map\n [Channels]\n " ) ?;
480
479
for ( key, val) in self . channels . iter ( ) {
481
480
write ! ( f, " {}: {}\n " , key, val) ?;
0 commit comments