Answers for "rust loop vector by size"

0

rust loop vector by size

let data = vec![1,2,3,4,5,6,7];

for x in data.iter().step_by(2) {
    println!("{}", x)
}
Posted by: Guest on February-16-2021

Browse Popular Code Answers by Language