Skip to content

Commit da8401c

Browse files
committed
Fix macros imports
1 parent f5a1c96 commit da8401c

File tree

3 files changed

+9
-27
lines changed

3 files changed

+9
-27
lines changed

vm/src/hint_processor/builtin_hint_processor/bigint.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ mod test {
110110
use crate::utils::test_utils::*;
111111
use assert_matches::assert_matches;
112112
use num_bigint::BigInt;
113-
use std::collections::HashMap;
114113

115114
#[cfg(target_arch = "wasm32")]
116115
use wasm_bindgen_test::*;

vm/src/hint_processor/builtin_hint_processor/poseidon_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ mod tests {
8383
use crate::hint_processor::hint_processor_definition::HintProcessorLogic;
8484
use crate::hint_processor::hint_processor_definition::HintReference;
8585
use crate::serde::deserialize_program::ApTracking;
86-
use std::collections::HashMap;
8786

8887
use crate::{hint_processor::builtin_hint_processor::hint_code, utils::test_utils::*};
8988
use assert_matches::assert_matches;

vm/src/utils.rs

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ pub mod test_utils {
474474

475475
macro_rules! compile_hint {
476476
($hint_code:expr, $constants:expr) => {{
477-
let constants: &HashMap<String, Felt252> = $constants;
477+
let constants: &crate::stdlib::collections::HashMap<String, Felt252> = $constants;
478478
let ap_tracking = ApTracking::default();
479-
let reference_ids = HashMap::new();
480-
let references = Vec::new();
479+
let reference_ids = crate::stdlib::collections::HashMap::new();
480+
let references = crate::stdlib::vec::Vec::new();
481481
let hint_processor = BuiltinHintProcessor::new_empty();
482482
let hint_data_ref = hint_processor.compile_hint(
483483
$hint_code,
@@ -493,32 +493,16 @@ pub mod test_utils {
493493

494494
macro_rules! run_hint {
495495
($vm:expr, $ids_data:expr, $hint_code:expr, $exec_scopes:expr, $constants:expr) => {{
496-
// let constants: &HashMap<String, Felt252> = $constants;
497-
// let ap_tracking = ApTracking::default();
498-
// let reference_ids = HashMap::new();
499-
// let references = Vec::new();
500-
// let accessible_scopes = Vec::new();
501-
// let mut hint_processor = BuiltinHintProcessor::new_empty();
502-
// let hint_data_ref = hint_processor
503-
// .compile_hint(
504-
// $hint_code,
505-
// &ap_tracking,
506-
// &reference_ids,
507-
// &references,
508-
// &accessible_scopes,
509-
// crate::stdlib::rc::Rc::new(constants.clone()),
510-
// )
511-
// .unwrap(); // TODO: Remove unwrap
512496
let (hint_data_ref, mut hint_processor) = compile_hint!($hint_code, $constants);
513497
let mut hint_data = hint_data_ref.expect("Failed to compile_hint").downcast::<HintProcessorData>().unwrap(); // TODO: Remove unwrap
514498
hint_data.ids_data = $ids_data;
515499
hint_processor.execute_hint(&mut $vm, $exec_scopes, &any_box!(*hint_data))
516500
}};
517501
($vm:expr, $ids_data:expr, $hint_code:expr, $exec_scopes:expr) => {{
518502
let ap_tracking = ApTracking::default();
519-
let reference_ids = HashMap::new();
520-
let references = Vec::new();
521-
let constants = crate::stdlib::rc::Rc::new(HashMap::new());
503+
let reference_ids = crate::stdlib::collections::HashMap::new();
504+
let references = crate::stdlib::vec::Vec::new();
505+
let constants = crate::stdlib::rc::Rc::new(crate::stdlib::collections::HashMap::new());
522506
let mut hint_processor = BuiltinHintProcessor::new_empty();
523507
let hint_data_ref = hint_processor
524508
.compile_hint(
@@ -535,9 +519,9 @@ pub mod test_utils {
535519
}};
536520
($vm:expr, $ids_data:expr, $hint_code:expr) => {{
537521
let ap_tracking = ApTracking::default();
538-
let reference_ids = HashMap::new();
539-
let references = Vec::new();
540-
let constants = crate::stdlib::rc::Rc::new(HashMap::new());
522+
let reference_ids = crate::stdlib::collections::HashMap::new();
523+
let references = crate::stdlib::vec::Vec::new();
524+
let constants = crate::stdlib::rc::Rc::new(crate::stdlib::collections::HashMap::new());
541525
let mut hint_processor = BuiltinHintProcessor::new_empty();
542526
let hint_data_ref = hint_processor
543527
.compile_hint(

0 commit comments

Comments
 (0)