Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
chore: nicer generic syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed May 10, 2023
1 parent 2daad1b commit 65090f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions acvm/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub enum CompileError {
UnsupportedBlackBox(BlackBoxFunc),
}

pub fn compile<F: Fn(&Opcode) -> bool>(
pub fn compile(
acir: Circuit,
np_language: Language,
is_opcode_supported: F,
is_opcode_supported: impl Fn(&Opcode) -> bool,
simplifier: &Simplifier,
) -> Result<Circuit, CompileError> {
// Instantiate the optimizer.
Expand Down
4 changes: 2 additions & 2 deletions acvm/src/compiler/transformers/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ pub struct FallbackTransformer;

impl FallbackTransformer {
//ACIR pass which replace unsupported opcodes using arithmetic fallback
pub fn transform<F: Fn(&Opcode) -> bool>(
pub fn transform(
acir: Circuit,
is_supported: F,
is_supported: impl Fn(&Opcode) -> bool,
simplifier: &Simplifier,
) -> Result<Circuit, CompileError> {
let mut acir_supported_opcodes = Vec::with_capacity(acir.opcodes.len());
Expand Down

0 comments on commit 65090f2

Please sign in to comment.