Drop unused variable

This commit is contained in:
rongyi 2024-05-20 14:42:34 +08:00
parent 21be3fdaf8
commit b0d6ac58f1

View File

@ -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])为切片