clippy
This commit is contained in:
parent
80256475b8
commit
34f4440355
5 changed files with 8 additions and 8 deletions
|
@ -22,7 +22,7 @@ pub struct BooleanArrayComparator;
|
|||
|
||||
impl BooleanArrayComparator {
|
||||
pub fn simplify<T: Field>(p: TypedProgram<T>) -> TypedProgram<T> {
|
||||
Self::default().fold_program(p)
|
||||
Self.fold_program(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ mod tests {
|
|||
]),
|
||||
));
|
||||
|
||||
let res = BooleanArrayComparator::default().fold_boolean_expression(e);
|
||||
let res = BooleanArrayComparator.fold_boolean_expression(e);
|
||||
|
||||
assert_eq!(res, expected);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ mod tests {
|
|||
]),
|
||||
));
|
||||
|
||||
let res = BooleanArrayComparator::default().fold_boolean_expression(e);
|
||||
let res = BooleanArrayComparator.fold_boolean_expression(e);
|
||||
|
||||
assert_eq!(res, expected);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ pub struct LogIgnorer;
|
|||
|
||||
impl LogIgnorer {
|
||||
pub fn ignore<T: Field>(p: TypedProgram<T>) -> TypedProgram<T> {
|
||||
Self::default().fold_program(p)
|
||||
Self.fold_program(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ impl fmt::Display for Error {
|
|||
}
|
||||
impl OutOfBoundsChecker {
|
||||
pub fn check<T: Field>(p: TypedProgram<T>) -> Result<TypedProgram<T>, Error> {
|
||||
Self::default().fold_program(p)
|
||||
Self.fold_program(p)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ impl<'ast, T: Field, I: IntoIterator<Item = Statement<'ast, T>>> ProgIterator<'a
|
|||
statements: self
|
||||
.statements
|
||||
.into_iter()
|
||||
.flat_map(|s| Cleaner::default().fold_statement(s)),
|
||||
.flat_map(|s| Cleaner.fold_statement(s)),
|
||||
solvers: self.solvers,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ pub fn optimize<'ast, T: Field, I: IntoIterator<Item = Statement<'ast, T>>>(
|
|||
|
||||
// define all optimizer steps
|
||||
let mut redefinition_optimizer = RedefinitionOptimizer::init(&p);
|
||||
let mut tautologies_optimizer = TautologyOptimizer::default();
|
||||
let mut tautologies_optimizer = TautologyOptimizer;
|
||||
let mut directive_optimizer = DirectiveOptimizer::default();
|
||||
let mut canonicalizer = Canonicalizer::default();
|
||||
let mut canonicalizer = Canonicalizer;
|
||||
let mut duplicate_optimizer = DuplicateOptimizer::default();
|
||||
|
||||
use zokrates_ast::ir::folder::Folder;
|
||||
|
|
Loading…
Reference in a new issue