Skip to content

Commit

Permalink
Use Any with StackFrameTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Jul 19, 2024
1 parent 3a07337 commit c7a57da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion valuescript_vm/src/stack_frame.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::any::Any;

use super::vs_value::Val;

pub type StackFrame = Box<dyn StackFrameTrait>;
Expand All @@ -18,7 +20,7 @@ pub enum FrameStepOk {

pub type FrameStepResult = Result<FrameStepOk, Val>;

pub trait StackFrameTrait {
pub trait StackFrameTrait: Any {
fn write_this(&mut self, const_: bool, this: Val) -> Result<(), Val>;
fn write_param(&mut self, param: Val);
fn step(&mut self) -> FrameStepResult;
Expand Down

0 comments on commit c7a57da

Please sign in to comment.