update chapter 3.5 heading

This commit is contained in:
Joe Chen
2023-06-11 14:43:45 +08:00
parent de8cf1f846
commit b96bcc0b22

View File

@@ -7,7 +7,7 @@ Rust中的控制流结构主要包括
- `while`循环;
- `for .. in` 循环。
## 3.5.1. if条件判断
## 3.5.1 if条件判断
- `if`执行条件判断,示例如下:
@@ -67,7 +67,7 @@ Rust中的控制流结构主要包括
}
```
## 3.5.2. loop循环
## 3.5.2 loop循环
- loop重复执行代码
@@ -134,7 +134,7 @@ Rust中的控制流结构主要包括
}
```
## 3.5.3. while条件循环
## 3.5.3 while条件循环
- `while`条件循环执行代码,当条件不满足时结束循环,如下:
@@ -167,7 +167,7 @@ Rust中的控制流结构主要包括
}
```
## 3.5.4. `for .. in` 循环
## 3.5.4 `for .. in` 循环
`for`循环用来对一个集合的每个元素执行一些代码,使用方式如下: