Update index.md

pull/100/head
LyntNy4n 3 years ago committed by GitHub
parent c8e85c2aa8
commit 38c2631209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,7 +19,7 @@ Rust每个值都有其确切的数据类型, 总的来说可以分为两类:
let guess = "42".parse().expect("Not a number!");
```
让我们先忽`.parse().expect..`部分,总之,这段代码将字符串`"42"`进行解析,但是我们没有标注想要解析的类型,因此编译器会报错:
让我们先忽`.parse().expect..`部分,总之,这段代码将字符串`"42"`进行解析,但是我们没有标注想要解析的类型,因此编译器会报错:
```console
$ cargo build
Compiling no_type_annotations v0.1.0 (file:///projects/no_type_annotations)

Loading…
Cancel
Save