Prefer iterator over vector in parse_circuits

Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
This commit is contained in:
Collin Chin 2020-10-27 11:04:48 -07:00 committed by GitHub
parent ff03e64314
commit 6931cadd71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ impl DynamicCheck {
///
/// Collects a vector of `Frames`s from a vector of circuit functions.
///
fn parse_circuits(&mut self, circuits: Vec<&Circuit>) -> Result<(), DynamicCheckError> {
fn parse_circuits<'a>(&mut self, circuits: impl Iterator<Item = &'a Circuit>) -> Result<(), DynamicCheckError> {
for circuit in circuits {
self.parse_circuit(circuit)?;
}