Prefer iterator over vector in parse_functions

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

View File

@ -111,7 +111,7 @@ impl DynamicCheck {
///
/// Collects a vector of `TypeAssertion` predicates from a vector of functions.
///
fn parse_functions(&mut self, functions: Vec<&Function>) -> Result<(), DynamicCheckError> {
fn parse_functions<'a>(&mut self, functions: impl Iterator<Item = &'a Function>) -> Result<(), DynamicCheckError> {
for function in functions {
self.parse_function(function)?;
}