File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -294,10 +294,8 @@ impl Builder {
294
294
user_config. channel_handshake_limits . force_announced_channel_preference = false ;
295
295
let channel_manager = {
296
296
if let Ok ( mut f) = fs:: File :: open ( format ! ( "{}/manager" , ldk_data_dir) ) {
297
- let mut channel_monitor_mut_references = Vec :: new ( ) ;
298
- for ( _, channel_monitor) in channel_monitors. iter_mut ( ) {
299
- channel_monitor_mut_references. push ( channel_monitor) ;
300
- }
297
+ let channel_monitor_references =
298
+ channel_monitors. iter_mut ( ) . map ( |( _, chanmon) | chanmon) . collect ( ) ;
301
299
let read_args = ChannelManagerReadArgs :: new (
302
300
Arc :: clone ( & keys_manager) ,
303
301
Arc :: clone ( & keys_manager) ,
@@ -308,7 +306,7 @@ impl Builder {
308
306
Arc :: clone ( & router) ,
309
307
Arc :: clone ( & logger) ,
310
308
user_config,
311
- channel_monitor_mut_references ,
309
+ channel_monitor_references ,
312
310
) ;
313
311
let ( _hash, channel_manager) =
314
312
<( BlockHash , ChannelManager ) >:: read ( & mut f, read_args)
You can’t perform that action at this time.
0 commit comments