If you wish to convert the entire Vec to a slice, you can use deref coercion: fn main() { let a = vec![1, 2, 3, 4, 5]; let b: &[i32] = &a; println!("{:?} ...
確定! 回上一頁