Skip to content

Commit 218bdf3

Browse files
authored
Update compile.rs
1 parent adcd081 commit 218bdf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/cairo-lang-executable/src/compile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ pub fn compile_executable_function_in_prepared_db<'db>(
228228

229229
// Since we build the entry point asking for a single function - we know it will be first, and
230230
// that it will be available.
231-
let executable_func = sierra_program.funcs[0].clone();
231+
let executable_func = &sierra_program.funcs[0];
232232
assert_eq!(executable_func.id, db.intern_sierra_function(executable.function_id(db).unwrap()));
233233
let builder = RunnableBuilder::new(sierra_program.clone(), None).map_err(|err| {
234234
let mut locs = vec![];
@@ -245,7 +245,7 @@ pub fn compile_executable_function_in_prepared_db<'db>(
245245
// If syscalls are allowed it means we allow for unsound programs.
246246
let allow_unsound = config.allow_syscalls;
247247
let wrapper = builder
248-
.create_wrapper_info(&executable_func, EntryCodeConfig::executable(allow_unsound))?;
248+
.create_wrapper_info(executable_func, EntryCodeConfig::executable(allow_unsound))?;
249249
let compiled_function = CompiledFunction { program: builder.casm_program().clone(), wrapper };
250250
Ok(CompileExecutableResult { compiled_function, builder, debug_info: debug_info.clone() })
251251
}

0 commit comments

Comments
 (0)