mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-01 18:56:38 +03:00
Prefer iterator over vector in parse_array
Co-authored-by: ljedrz <ljedrz@users.noreply.github.com>
This commit is contained in:
parent
0636997ddb
commit
e58f00d8b5
@ -763,7 +763,7 @@ impl Frame {
|
||||
///
|
||||
/// Returns the type of the array expression.
|
||||
///
|
||||
fn parse_array(&mut self, expressions: &Vec<SpreadOrExpression>, span: &Span) -> Result<Type, FrameError> {
|
||||
fn parse_array(&mut self, expressions: impl Iterator<Item = SpreadOrExpression>, span: &Span) -> Result<Type, FrameError> {
|
||||
// Store array element type.
|
||||
let mut element_type = None;
|
||||
let mut count = 0usize;
|
||||
|
Loading…
Reference in New Issue
Block a user