aztec-nr - noir_aztec::utils::remove_constraints

Function remove_constraints_if

pub fn remove_constraints_if<Env, T>(condition: bool, f: fn[Env]() -> T) -> T

Calls a function and returns its return value, removing any constraints associated with calling the function if condition is true, behaving as if the function was unconstrained.

Requires condition to be a compile time constant.