Skip to content

Commit

Permalink
[VAN-655] remove unsafe usage (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hoffman authored Aug 12, 2024
1 parent 9447824 commit fd0a9af
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions circuit_passes/src/bucket_interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,8 @@ impl BucketInterpreter<'_, '_> {
self.flags.clone(),
);
let observe = observe && !interp.observer.ignore_extracted_function_calls();
unsafe {
let ptr = instructions.as_ptr();
for i in 0..instructions.len() {
let inst = ptr.add(i).as_ref().unwrap();
res = Result::from(interp._execute_instruction(inst, res.1, observe))?;
}
for inst in instructions {
res = Result::from(interp._execute_instruction(&inst, res.1, observe))?;
}
// ASSERT: All generated functions have void return type, thus produce no value(s)
assert!(res.0.is_empty());
Expand Down

0 comments on commit fd0a9af

Please sign in to comment.