fix panic warning
This commit is contained in:
parent
2019803d20
commit
4c5aa898e0
2 changed files with 8 additions and 10 deletions
|
@ -40,7 +40,7 @@ pub trait Analyse {
|
|||
impl<'ast, T: Field> TypedProgram<'ast, T> {
|
||||
pub fn analyse(self) -> ZirProgram<'ast, T> {
|
||||
// propagated unrolling
|
||||
let r = PropagatedUnroller::unroll(self).unwrap_or_else(|e| panic!(e));
|
||||
let r = PropagatedUnroller::unroll(self).unwrap_or_else(|e| panic!("{}", e));
|
||||
|
||||
// return binding
|
||||
let r = ReturnBinder::bind(r);
|
||||
|
|
|
@ -28,15 +28,13 @@ impl UnconstrainedVariableDetector {
|
|||
// we should probably handle this case instead of asserting at some point
|
||||
assert!(
|
||||
instance.variables.is_empty(),
|
||||
format!(
|
||||
"Unconstrained variables are not allowed (found {} occurrence{})",
|
||||
instance.variables.len(),
|
||||
if instance.variables.len() == 1 {
|
||||
""
|
||||
} else {
|
||||
"s"
|
||||
}
|
||||
)
|
||||
"Unconstrained variables are not allowed (found {} occurrence{})",
|
||||
instance.variables.len(),
|
||||
if instance.variables.len() == 1 {
|
||||
""
|
||||
} else {
|
||||
"s"
|
||||
}
|
||||
);
|
||||
p
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue