Skip to content

Commit 4493e2c

Browse files
author
WaySLOG
committed
Merge pull request #136 from ahjdzx/master
fix for gitbook
2 parents 6d698f6 + cd48393 commit 4493e2c

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

06-flow/06-01-comment.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,21 @@ let y = 6; // 创建另一个绑定
2121

2222
文档注释使用 ```///```,一般用于函数或结构体(字段)的说明,置于要说明的对象上方。文档注释内部可使用markdown格式的标记语法,可用于 rustdoc 工具的自动文档提取。
2323

24-
```
25-
/// Adds one to the number given.
26-
///
27-
/// # Examples
28-
///
29-
/// ```
30-
/// let five = 5;
31-
///
32-
/// assert_eq!(6, add_one(5));
33-
/// # fn add_one(x: i32) -> i32 {
34-
/// # x + 1
35-
/// # }
36-
/// ```
37-
fn add_one(x: i32) -> i32 {
38-
x + 1
39-
}
40-
41-
```
24+
/// Adds one to the number given.
25+
///
26+
/// # Examples
27+
///
28+
/// ```
29+
/// let five = 5;
30+
///
31+
/// assert_eq!(6, add_one(5));
32+
/// # fn add_one(x: i32) -> i32 {
33+
/// # x + 1
34+
/// # }
35+
/// ```
36+
fn add_one(x: i32) -> i32 {
37+
x + 1
38+
}
4239

4340

4441
## 模块注释

0 commit comments

Comments
 (0)