We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6bb340 commit bce3032Copy full SHA for bce3032
functions/functions5.rs
@@ -40,7 +40,7 @@ fn square(num: i32) -> i32 {
40
41
// This is a really common error that can be fixed by removing one character.
42
// It happens because Rust distinguishes between expressions and statements: expressions return
43
-// a value based on its operand and statements simply retun a `()` type which just like `void` in C/C++ language.
+// a value based on its operand, and statements simply retun a () type which behaves just like `void` in C/C++ language.
44
// We want to return a value of `i32` type from the `square` function, but it is returning a `()` type...
45
// They are not the same. There are two solusions:
46
// 1. Add a `return` ahead of `num * num;`
0 commit comments