diff --git a/runtime/src/program/state.rs b/runtime/src/program/state.rs index c377814a74..14cd368e12 100644 --- a/runtime/src/program/state.rs +++ b/runtime/src/program/state.rs @@ -56,6 +56,11 @@ where &self.program } + /// Returns a mutable reference to the [`Program`] of the [`State`]. + pub fn program_mut(&mut self) -> &mut P { + &mut self.program + } + /// Queues an event in the [`State`] for processing during an [`update`]. /// /// [`update`]: Self::update