Drop unused variable
This commit is contained in:
parent
21be3fdaf8
commit
b0d6ac58f1
@ -74,7 +74,6 @@ fn find(nums: &[i32], target: i32) -> Option<usize> {
|
||||
fn main() {
|
||||
/* 初始化数组 */
|
||||
let arr: [i32; 5] = [0; 5];
|
||||
let slice: &[i32] = &[0; 5];
|
||||
print!("数组 arr = ");
|
||||
print_util::print_array(&arr);
|
||||
// 在 Rust 中,指定长度时([i32; 5])为数组,不指定长度时(&[i32])为切片
|
||||
|
Loading…
Reference in New Issue
Block a user