@@ -22,7 +22,7 @@ pub struct InstructionExecution<'a, 'b> {
2222 accounts : Vec < ( Pubkey , AccountSharedData ) > ,
2323 ctx : & ' a StakeTestContext ,
2424 checks : Option < & ' b [ Check < ' b > ] > ,
25- test_missing_signers : Option < bool > , // `None` runs if `Check::success`
25+ test_missing_signers : Option < bool > , // `None` runs if `Check::success`
2626}
2727
2828impl < ' b > InstructionExecution < ' _ , ' b > {
@@ -36,27 +36,27 @@ impl<'b> InstructionExecution<'_, 'b> {
3636 self
3737 }
3838
39- /// Executes the instruction. If `checks` is `None` or empty,
39+ /// Executes the instruction. If `checks` is `None` or empty,
4040 /// uses `Check::success()`.
41- /// Fail-safe default: when `test_missing_signers` is `None`,
41+ /// Fail-safe default: when `test_missing_signers` is `None`,
4242 /// runs the missing-signers test (`true`).
43- /// Callers must explicitly opt out with `.test_missing_signers(false)`.
44- pub fn execute ( self ) -> mollusk_svm:: result:: InstructionResult {
45- let default_checks = [ Check :: success ( ) ] ;
46- let checks = match self . checks {
47- Some ( c) if !c. is_empty ( ) => c,
48- _ => & default_checks,
49- } ;
43+ /// Callers must explicitly opt out with `.test_missing_signers(false)`.
44+ pub fn execute ( self ) -> mollusk_svm:: result:: InstructionResult {
45+ let default_checks = [ Check :: success ( ) ] ;
46+ let checks = match self . checks {
47+ Some ( c) if !c. is_empty ( ) => c,
48+ _ => & default_checks,
49+ } ;
5050
51- let test_missing_signers = self . test_missing_signers . unwrap_or ( true ) ;
51+ let test_missing_signers = self . test_missing_signers . unwrap_or ( true ) ;
5252
53- self . ctx . process_instruction_maybe_test_signers (
54- & self . instruction ,
55- self . accounts ,
56- checks,
57- test_missing_signers,
58- )
59- }
53+ self . ctx . process_instruction_maybe_test_signers (
54+ & self . instruction ,
55+ self . accounts ,
56+ checks,
57+ test_missing_signers,
58+ )
59+ }
6060}
6161
6262impl < ' a > InstructionExecution < ' a , ' _ > {
0 commit comments