mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 23:36:30 +08:00
Fix the type annotation in Rust (#951)
This commit is contained in:
parent
a01363234c
commit
b8591822d8
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@
|
||||||
```rust title=""
|
```rust title=""
|
||||||
// 使用多种基本数据类型来初始化数组
|
// 使用多种基本数据类型来初始化数组
|
||||||
let numbers: Vec<i32> = vec![0; 5];
|
let numbers: Vec<i32> = vec![0; 5];
|
||||||
let decimals: Vec<float> = vec![0.0, 5];
|
let decimals: Vec<f32> = vec![0.0, 5];
|
||||||
let characters: Vec<char> = vec!['0'; 5];
|
let characters: Vec<char> = vec!['0'; 5];
|
||||||
let bools: Vec<bool> = vec![false; 5];
|
let bools: Vec<bool> = vec![false; 5];
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue