Merge pull request #27 from neophyt3/fix-typos

Fix typos
This commit is contained in:
Dhghomon 2020-07-26 00:18:33 +09:00 committed by GitHub
commit 3f97f37142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -317,7 +317,8 @@ fn main() {
}
```
The `{}` in `println!` means "put the variable inside here". This prints `Hello world number 8`.
The `{}` in `println!` means "put the variable inside here". This prints `Hello world number 8!`.
We can put more in:
@ -333,7 +334,7 @@ Now let's create the function.
```rust
fn main() {
println!("Hello, world number {}", number());
println!("Hello, world number {}!", number());
}
fn number() -> i32 {
@ -1224,7 +1225,7 @@ fn main() {
// No problem, because my_number is copy type!
}
prints_number(number: i32) { // No return with ->
fn prints_number(number: i32) { // No return with ->
// If number was not copy type, it would take it
// and we couldn't use it again
println!("{}", number);