|
|
|
|
|
by burntsushi
4155 days ago
|
|
Explicit returns are not frowned upon. I don't know where you got that idea. The only thing I can think is that this: fn foo() -> bool {
true
}
is preferred over fn foo() -> bool {
return true
}
But that's more of a style issue.As for `;`, it's just like Standard ML. `;` is for sequencing expressions. I love it. |
|
From the docs:
http://doc.rust-lang.org/book/functions.html
> Using a `return` as the last line of a function works, but is considered poor style