|
|
|
@ -304,7 +304,7 @@ fn main() {
|
|
|
|
|
let arr: [i32; 3] = [1, 2, 3];
|
|
|
|
|
display_array(arr);
|
|
|
|
|
|
|
|
|
|
let arr: [i32;2] = [1,2];
|
|
|
|
|
let arr: [i32; 2] = [1, 2];
|
|
|
|
|
display_array(arr);
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
@ -332,7 +332,7 @@ fn main() {
|
|
|
|
|
let arr: [i32; 3] = [1, 2, 3];
|
|
|
|
|
display_array(&arr);
|
|
|
|
|
|
|
|
|
|
let arr: [i32;2] = [1,2];
|
|
|
|
|
let arr: [i32; 2] = [1, 2];
|
|
|
|
|
display_array(&arr);
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
@ -349,7 +349,7 @@ fn main() {
|
|
|
|
|
let arr: [i32; 3] = [1, 2, 3];
|
|
|
|
|
display_array(&arr);
|
|
|
|
|
|
|
|
|
|
let arr: [i32;2] = [1,2];
|
|
|
|
|
let arr: [i32; 2] = [1, 2];
|
|
|
|
|
display_array(&arr);
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
@ -470,4 +470,4 @@ fn main() {
|
|
|
|
|
> - [泛型](https://practice-zh.course.rs/generics-traits/generics.html)
|
|
|
|
|
> - [习题解答](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/generics.md)
|
|
|
|
|
> - [const 泛型](https://practice-zh.course.rs/generics-traits/const-generics.html)
|
|
|
|
|
> - [习题解答](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/const-generics.md)
|
|
|
|
|
> - [习题解答](https://github.com/sunface/rust-by-practice/blob/master/solutions/generics-traits/const-generics.md)
|
|
|
|
|