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
318318 & self , mut output_descriptors : Vec < SpendableOutputDescriptor > ,
319319 channel_id : Option < ChannelId > , exclude_static_ouputs : bool ,
320320 ) {
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 ( ) {
331329 return ;
332330 }
333331
You can’t perform that action at this time.
0 commit comments