File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -318,16 +318,14 @@ where
318
318
& self , mut output_descriptors : Vec < SpendableOutputDescriptor > ,
319
319
channel_id : Option < ChannelId > , exclude_static_ouputs : bool ,
320
320
) {
321
- let relevant_descriptors = if exclude_static_ouputs {
322
- output_descriptors
323
- . drain ( ..)
324
- . filter ( |desc| !matches ! ( desc, SpendableOutputDescriptor :: StaticOutput { .. } ) )
325
- . collect :: < Vec < _ > > ( )
326
- } else {
327
- output_descriptors
328
- } ;
329
-
330
- if relevant_descriptors. is_empty ( ) {
321
+ let mut relevant_descriptors = output_descriptors
322
+ . drain ( ..)
323
+ . filter ( |desc| {
324
+ !( exclude_static_ouputs &&
325
+ matches ! ( desc, SpendableOutputDescriptor :: StaticOutput { .. } ) )
326
+ } ) . peekable ( ) ;
327
+
328
+ if relevant_descriptors. peek ( ) . is_none ( ) {
331
329
return ;
332
330
}
333
331
You can’t perform that action at this time.
0 commit comments