fix: cargo fmt

This commit is contained in:
Moudy 2026-04-07 20:16:42 +02:00
parent 27fbd10d92
commit a87e8d93dc
6 changed files with 46 additions and 9 deletions

View File

@ -87,5 +87,12 @@ fn main() {
// WARNING: constructing a `ProgramOutput` has no effect on its own. `.write()` must be
// called to commit the output.
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states).write();
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
pre_states,
post_states,
)
.write();
}

View File

@ -118,8 +118,11 @@ impl ValidatedStateDiff {
"Program {:?} pre_states: {:?}, instruction_data: {:?}",
chained_call.program_id, chained_call.pre_states, chained_call.instruction_data
);
let mut program_output =
program.execute(caller_program_id, &chained_call.pre_states, &chained_call.instruction_data)?;
let mut program_output = program.execute(
caller_program_id,
&chained_call.pre_states,
&chained_call.instruction_data,
)?;
debug!(
"Program {:?} output: {:?}",
chained_call.program_id, program_output

View File

@ -86,5 +86,12 @@ fn main() {
_ => panic!("invalid params"),
};
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states).write();
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
pre_states,
post_states,
)
.write();
}

View File

@ -34,7 +34,13 @@ fn main() {
pda_seeds: vec![],
};
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states)
.with_chained_calls(vec![chained_call])
.write();
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
pre_states,
post_states,
)
.with_chained_calls(vec![chained_call])
.write();
}

View File

@ -82,5 +82,12 @@ fn main() {
}
_ => panic!("invalid params"),
};
ProgramOutput::new(self_program_id, caller_program_id, instruction_data, pre_states, post_states).write();
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_data,
pre_states,
post_states,
)
.write();
}

View File

@ -17,5 +17,12 @@ fn main() {
.iter()
.map(|account| AccountPostState::new(account.account.clone()))
.collect();
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states).write();
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
pre_states,
post_states,
)
.write();
}