Skip to content

Commit

Permalink
Revert "Use Box to reduce output size"
Browse files Browse the repository at this point in the history
This reverts commit fc76a36.
  • Loading branch information
fmoletta committed Nov 23, 2023
1 parent f2227bd commit 3260f53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vm/src/hint_processor/hint_processor_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub trait HintProcessorLogic {

// A map of hints that can be used to extend the current map of hints for the vm run
// The map matches the pc at which the hints should be executed to a vec of compiled hints (Outputed by HintProcessor::CompileHint)
pub type HintExtension = Box<HashMap<Relocatable, Vec<Box<dyn Any>>>>;
pub type HintExtension = HashMap<Relocatable, Vec<Box<dyn Any>>>;

pub trait HintProcessor: HintProcessorLogic + ResourceTracker {}
impl<T> HintProcessor for T where T: HintProcessorLogic + ResourceTracker {}
Expand Down
2 changes: 1 addition & 1 deletion vm/src/vm/vm_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ impl VirtualMachine {
.map_err(|err| VirtualMachineError::Hint(Box::new((idx - s, err))))?;
// Check if the hint executed adds new hints, and update the hint_ranges & hint_datas accordingly
if let Some(hint_extension) = res {
for (hint_pc, hints) in *hint_extension {
for (hint_pc, hints) in hint_extension {
if let Ok(len) = NonZeroUsize::try_from(hints.len()) {
hint_ranges.insert(hint_pc, (hint_datas.len(), len));
hint_datas.extend(hints);
Expand Down

0 comments on commit 3260f53

Please sign in to comment.