Rust filter iterator, why the arg type are different

后端 未结 0 1465
感情败类
感情败类 2021-01-30 22:16

I use filter, but I dont know why I should use **x > 1 for an array, but use *x > 1 for a range.

fn main() {
    let a = [0, 1, 2,         


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