diff --git a/src/circuit/ops/chip.rs b/src/circuit/ops/chip.rs index e208ace0..05d5d90c 100644 --- a/src/circuit/ops/chip.rs +++ b/src/circuit/ops/chip.rs @@ -75,6 +75,16 @@ impl FromStr for CheckMode { } } +impl CheckMode { + /// Returns the value of the check mode + pub fn is_safe(&self) -> bool { + match self { + CheckMode::SAFE => true, + CheckMode::UNSAFE => false, + } + } +} + #[allow(missing_docs)] /// An enum representing the tolerance we can accept for the accumulated arguments, either absolute or percentage #[derive(Clone, Default, Debug, PartialEq, PartialOrd, Serialize, Deserialize, Copy)] diff --git a/src/circuit/ops/layouts.rs b/src/circuit/ops/layouts.rs index a30b1bcf..7de343b1 100644 --- a/src/circuit/ops/layouts.rs +++ b/src/circuit/ops/layouts.rs @@ -4038,7 +4038,7 @@ pub(crate) fn range_check