提交 1777047a 编写于 作者: D Daniel Hofstetter

Guide: Make add_three_times_four() public

上级 f66fd2ee
......@@ -3325,7 +3325,8 @@ To do that, we'll need to make a new module. Make a new file, `src/lib.rs`,
and put this in it:
```{rust}
fn add_three_times_four(x: int) -> int {
# fn main() {}
pub fn add_three_times_four(x: int) -> int {
(x + 3) * 4
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册