diff --git a/crates/cairo-lang-test-plugin/src/lib.rs b/crates/cairo-lang-test-plugin/src/lib.rs index 3695262c7d2..304ddfabb81 100644 --- a/crates/cairo-lang-test-plugin/src/lib.rs +++ b/crates/cairo-lang-test-plugin/src/lib.rs @@ -1,5 +1,3 @@ -use std::default::Default; - use anyhow::{Result, ensure}; use cairo_lang_compiler::diagnostics::DiagnosticsReporter; use cairo_lang_compiler::{ensure_diagnostics, get_sierra_program_for_functions}; @@ -145,8 +143,8 @@ pub fn compile_test_prepared_db<'db>( ) .collect(); - let SierraProgramWithDebug { program: sierra_program, debug_info } = - get_sierra_program_for_functions(db, func_ids)?; + let SierraProgramWithDebug { program: mut sierra_program, debug_info } = + get_sierra_program_for_functions(db, func_ids)?.clone(); let function_set_costs: OrderedHashMap> = all_entry_points .iter() @@ -159,13 +157,14 @@ pub fn compile_test_prepared_db<'db>( .collect(); let replacer = DebugReplacer { db }; - let mut sierra_program = sierra_program.clone(); replacer.enrich_function_names(&mut sierra_program); let mut annotations = Annotations::default(); if tests_compilation_config.add_statements_functions { annotations.extend(Annotations::from( - debug_info.statements_locations.extract_statements_functions(db), + debug_info + .statements_locations + .extract_statements_source_code_locations(db), )) } if tests_compilation_config.add_statements_code_locations {