mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-02-02 23:38:41 +08:00
add the missed right "}"
This commit is contained in:
parent
f84392238b
commit
4ea044fd09
@ -63,6 +63,7 @@ loop {
|
||||
match guess.cmp(&secret_number) {
|
||||
// --snip--
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`if` 表达式检查了值是否超出范围,告诉用户出了什么问题,并调用 `continue` 开始下一次循环,请求另一个猜测。`if` 表达式之后,就可以在知道 `guess` 在 1 到 100 之间的情况下与秘密数字作比较了。
|
||||
|
Loading…
Reference in New Issue
Block a user