The Ion Rust library’s container Element types ( List , SExp , Struct ) cannot be iterated with standard…
The Ion Rust library’s container Element types ( List , SExp , Struct ) cannot be iterated with standard…: a task in LegoFlow-SWE (Harbor dataset). let list = ion list! 1, 2, 3 ; let mut sum = 0; for element in &list { // ^^^^ error: &List is not an iterator // help: trait Iterator is not…
The task
let list = ion_list![1, 2, 3]; let mut sum = 0; for element in &list { // ^^^^ error: `&List` is not an iterator // help: trait `Iterator` is not implemented for `&List` sum += element.as_i64().unwrap(); } ```
Part of Lego-X/LegoFlow-SWE.