Guide: Make add_three_times_four() public

This commit is contained in:
Daniel Hofstetter 2014-08-05 16:43:17 +02:00
parent f66fd2eed1
commit 1777047a54
1 changed files with 2 additions and 1 deletions

View File

@ -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
}
```