In this example, the Rust compiler can infer the type of twice , 2 , and 1 ... let squares: Vec<_> = (0..10).map(|i| i * i).collect();.
確定! 回上一頁