mirror of
https://github.com/RustyCab/LearnRustEasy.git
synced 2026-02-03 18:23:31 +08:00
Update chapter_3_4.md
This commit is contained in:
@@ -68,12 +68,12 @@ pub fn add_one(x: i32) -> i32 {
|
||||
/** `add_two` 将指定值加2
|
||||
|
||||
|
||||
```
|
||||
\```
|
||||
let arg = 5;
|
||||
let answer = my_crate::add_two(arg);
|
||||
|
||||
assert_eq!(7, answer);
|
||||
```
|
||||
\```
|
||||
*/
|
||||
pub fn add_two(x: i32) -> i32 {
|
||||
x + 2
|
||||
|
||||
Reference in New Issue
Block a user