mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
reference: explicit return at function end is not idiomatic
This commit is contained in:
parent
b8b18aac12
commit
85b19d8aa3
@ -3504,7 +3504,7 @@ An example of a `fn` type:
|
||||
|
||||
```
|
||||
fn add(x: i32, y: i32) -> i32 {
|
||||
return x + y;
|
||||
x + y
|
||||
}
|
||||
|
||||
let mut x = add(5,7);
|
||||
|
Loading…
Reference in New Issue
Block a user