Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 flow-control.md 中的谬误 #1486

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/basic/flow-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ for _ in 0..10 {
}
```

可以用 `_` 来替代 `i` 用于 `for` 循环中,在 Rust 中 `_` 的含义是忽略该值或者类型的意思,如果不使用 `_`,那么编译器会给你一个 `变量未使用的` 的警告。
可以用 `_` 来替代 `i` 用于 `for` 循环中,在 Rust 中 `_` 的含义是忽略该值或者类型的意思,如果不使用 `_`,那么编译器也不会给你一个 `变量未使用的` 的警告。

**两种循环方式优劣对比**

Expand Down