@@ -357,7 +357,7 @@ pub fn transfer(
357
357
accounts. push ( AccountMeta :: new ( * destination_pubkey, false ) ) ;
358
358
accounts. push ( AccountMeta :: new_readonly (
359
359
* authority_pubkey,
360
- signer_pubkeys. len ( ) == 0 ,
360
+ signer_pubkeys. is_empty ( ) ,
361
361
) ) ;
362
362
for signer_pubkey in signer_pubkeys. iter ( ) {
363
363
accounts. push ( AccountMeta :: new ( * * signer_pubkey, true ) ) ;
@@ -388,7 +388,7 @@ pub fn approve(
388
388
}
389
389
accounts. push ( AccountMeta :: new_readonly (
390
390
* owner_pubkey,
391
- signer_pubkeys. len ( ) == 0 ,
391
+ signer_pubkeys. is_empty ( ) ,
392
392
) ) ;
393
393
for signer_pubkey in signer_pubkeys. iter ( ) {
394
394
accounts. push ( AccountMeta :: new ( * * signer_pubkey, true ) ) ;
@@ -416,7 +416,7 @@ pub fn set_owner(
416
416
accounts. push ( AccountMeta :: new_readonly ( * new_owner_pubkey, false ) ) ;
417
417
accounts. push ( AccountMeta :: new_readonly (
418
418
* owner_pubkey,
419
- signer_pubkeys. len ( ) == 0 ,
419
+ signer_pubkeys. is_empty ( ) ,
420
420
) ) ;
421
421
for signer_pubkey in signer_pubkeys. iter ( ) {
422
422
accounts. push ( AccountMeta :: new ( * * signer_pubkey, true ) ) ;
@@ -445,7 +445,7 @@ pub fn mint_to(
445
445
accounts. push ( AccountMeta :: new ( * account_pubkey, false ) ) ;
446
446
accounts. push ( AccountMeta :: new_readonly (
447
447
* owner_pubkey,
448
- signer_pubkeys. len ( ) == 0 ,
448
+ signer_pubkeys. is_empty ( ) ,
449
449
) ) ;
450
450
for signer_pubkey in signer_pubkeys. iter ( ) {
451
451
accounts. push ( AccountMeta :: new ( * * signer_pubkey, true ) ) ;
@@ -474,7 +474,7 @@ pub fn burn(
474
474
accounts. push ( AccountMeta :: new ( * mint_pubkey, false ) ) ;
475
475
accounts. push ( AccountMeta :: new_readonly (
476
476
* authority_pubkey,
477
- signer_pubkeys. len ( ) == 0 ,
477
+ signer_pubkeys. is_empty ( ) ,
478
478
) ) ;
479
479
for signer_pubkey in signer_pubkeys. iter ( ) {
480
480
accounts. push ( AccountMeta :: new ( * * signer_pubkey, true ) ) ;
@@ -489,9 +489,5 @@ pub fn burn(
489
489
490
490
/// Utility function that checks index is between MIN_SIGNERS and MAX_SIGNERS
491
491
pub fn is_valid_signer_index ( index : usize ) -> bool {
492
- if index < MIN_SIGNERS || index > MAX_SIGNERS {
493
- false
494
- } else {
495
- true
496
- }
492
+ !( index < MIN_SIGNERS || index > MAX_SIGNERS )
497
493
}
0 commit comments