Skip to content

Commit 781a0d2

Browse files
committed
Remove not planned todos
1 parent 1f6537c commit 781a0d2

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

vm/src/hint_processor/hint_processor_definition.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub trait HintProcessorLogic {
4949
ap_tracking: ap_tracking_data.clone(),
5050
ids_data: get_ids_data(reference_ids, references)?,
5151
constants,
52-
f: None, // TODO: Check what to do here
52+
f: None,
5353
}))
5454
}
5555

@@ -77,7 +77,6 @@ pub type HintExtension = HashMap<Relocatable, Vec<Box<dyn Any>>>;
7777
pub trait HintProcessor: HintProcessorLogic + ResourceTracker {}
7878
impl<T> HintProcessor for T where T: HintProcessorLogic + ResourceTracker {}
7979

80-
// TODO: Check how to not make it public
8180
pub fn get_ids_data(
8281
reference_ids: &HashMap<String, usize>,
8382
references: &[HintReference],

vm/src/utils.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,15 +486,18 @@ pub mod test_utils {
486486
&references,
487487
crate::stdlib::rc::Rc::new(constants.clone()),
488488
);
489-
(hint_data_ref, hint_processor) // TODO: Check if the processor can be passed as a reference so we dont have to return it
489+
(hint_data_ref, hint_processor)
490490
}};
491491
}
492492
pub(crate) use compile_hint;
493493

494494
macro_rules! run_hint {
495495
($vm:expr, $ids_data:expr, $hint_code:expr, $exec_scopes:expr, $constants:expr) => {{
496496
let (hint_data_ref, mut hint_processor) = compile_hint!($hint_code, $constants);
497-
let mut hint_data = hint_data_ref.expect("Failed to compile_hint").downcast::<HintProcessorData>().unwrap(); // TODO: Remove unwrap
497+
let mut hint_data = hint_data_ref
498+
.expect("Failed to compile_hint")
499+
.downcast::<HintProcessorData>()
500+
.unwrap();
498501
hint_data.ids_data = $ids_data;
499502
hint_processor.execute_hint(&mut $vm, $exec_scopes, &any_box!(*hint_data))
500503
}};
@@ -512,8 +515,8 @@ pub mod test_utils {
512515
&references,
513516
constants,
514517
)
515-
.unwrap(); // TODO: Remove unwrap
516-
let mut hint_data = hint_data_ref.downcast::<HintProcessorData>().unwrap(); // TODO: Remove unwrap
518+
.unwrap();
519+
let mut hint_data = hint_data_ref.downcast::<HintProcessorData>().unwrap();
517520
hint_data.ids_data = $ids_data;
518521
hint_processor.execute_hint(&mut $vm, $exec_scopes, &any_box!(*hint_data))
519522
}};
@@ -531,8 +534,8 @@ pub mod test_utils {
531534
&references,
532535
constants,
533536
)
534-
.unwrap(); // TODO: Remove unwrap
535-
let mut hint_data = hint_data_ref.downcast::<HintProcessorData>().unwrap(); // TODO: Remove unwrap
537+
.unwrap();
538+
let mut hint_data = hint_data_ref.downcast::<HintProcessorData>().unwrap();
536539
hint_data.ids_data = $ids_data;
537540
hint_processor.execute_hint(&mut $vm, exec_scopes_ref!(), &any_box!(*hint_data))
538541
}};

0 commit comments

Comments
 (0)