Why adding mut to passed Iterator reference solve this?

前端 未结 0 1471
情话喂你
情话喂你 2021-01-17 03:11

In the following rust snippet:

fn main() {
    let list1: Vec = vec![0, 1, 2, 3, 4];

    let it1 = list1.iter();
    let tens = it1.map(|x| x * 10         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题