@@ -3301,6 +3301,13 @@ pub mod zkapp_command {
33013301 self . fold_impl ( init, & mut fun)
33023302 }
33033303
3304+ pub fn exists < ' a , F > ( & ' a self , mut fun : F ) -> bool
3305+ where
3306+ F : FnMut ( & ' a AccUpdate ) -> bool ,
3307+ {
3308+ self . fold ( false , |acc, x| acc || fun ( x) )
3309+ }
3310+
33043311 fn map_to_impl < F , AnotherAccUpdate : Clone + AccountUpdateRef > (
33053312 & self ,
33063313 fun : & F ,
@@ -3627,16 +3634,15 @@ pub mod zkapp_command {
36273634
36283635 pub fn has_zero_vesting_period ( & self ) -> bool {
36293636 self . account_updates
3630- . iter ( )
3631- . any ( |p| match & p. elt . account_update . body . update . timing {
3637+ . exists ( |account_update| match & account_update. body . update . timing {
36323638 SetOrKeep :: Keep => false ,
36333639 SetOrKeep :: Set ( Timing { vesting_period, .. } ) => vesting_period. is_zero ( ) ,
36343640 } )
36353641 }
36363642
36373643 pub fn is_incompatible_version ( & self ) -> bool {
3638- self . account_updates . iter ( ) . any ( |p | {
3639- match & p . elt . account_update . body . update . permissions {
3644+ self . account_updates . exists ( |account_update | {
3645+ match & account_update. body . update . permissions {
36403646 SetOrKeep :: Keep => false ,
36413647 SetOrKeep :: Set ( Permissions {
36423648 set_verification_key,
0 commit comments