摘要: let v: Vec<u8>: v = Vec::new(); let v = vec![1,2,3,4];//注意小写v v.push(1); let third: &i32 = &v[2];//访问越界,panic v.get(2);//注意空情况,一般用match for i in &v { 阅读全文
posted @ 2021-01-17 21:58 carrotmvp 阅读(252) 评论(0) 推荐(0) 编辑