Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAN-655] remove unsafe usage #145

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading