Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改 function.md 中的一处小错误 #1491

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/basic/base-type/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn add(i: i32, j: i32) -> i32 {

## 函数要点

- 函数名和变量名使用[蛇形命名法(snake case)](https://course.rs/practice/naming.html),例如 `fn add_two() -> {}`
- 函数名和变量名使用[蛇形命名法(snake case)](https://course.rs/practice/naming.html),例如 `fn add_two() {}`
- 函数的位置可以随便放,Rust 不关心我们在哪里定义了函数,只要有定义即可
- 每个函数参数都需要标注类型

Expand Down