add the missed right "}"

This commit is contained in:
zyede 2022-01-07 02:09:34 +08:00 committed by GitHub
parent f84392238b
commit 4ea044fd09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,7 @@ loop {
match guess.cmp(&secret_number) {
// --snip--
}
}
```
`if` 表达式检查了值是否超出范围,告诉用户出了什么问题,并调用 `continue` 开始下一次循环,请求另一个猜测。`if` 表达式之后,就可以在知道 `guess` 在 1 到 100 之间的情况下与秘密数字作比较了。