File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -670,8 +670,7 @@ impl<K: InnerXKey> DescriptorXKey<K> {
670
670
) ,
671
671
} ;
672
672
673
- let path_excluding_wildcard = if self . wildcard != Wildcard :: None && path. as_ref ( ) . len ( ) > 0
674
- {
673
+ let path_excluding_wildcard = if self . wildcard != Wildcard :: None && !path. is_empty ( ) {
675
674
path. into_iter ( )
676
675
. take ( path. as_ref ( ) . len ( ) - 1 )
677
676
. cloned ( )
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ pub(super) fn from_txdata<'txin>(
212
212
let has_annex = wit_stack
213
213
. last ( )
214
214
. and_then ( |x| x. as_push ( ) . ok ( ) )
215
- . map ( |x| x . len ( ) > 0 && x[ 0 ] == TAPROOT_ANNEX_PREFIX )
215
+ . map ( |x| !x . is_empty ( ) && x[ 0 ] == TAPROOT_ANNEX_PREFIX )
216
216
. unwrap_or ( false ) ;
217
217
let has_annex = has_annex && ( wit_stack. len ( ) >= 2 ) ;
218
218
if has_annex {
You can’t perform that action at this time.
0 commit comments