1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

fix panic warning

This commit is contained in:
schaeff 2021-03-10 11:28:21 +01:00
parent 2019803d20
commit 4c5aa898e0
2 changed files with 8 additions and 10 deletions

View file

@ -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);

View file

@ -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
}