Skip to content

Commit 8ef4869

Browse files
authored
fix(functions5): Remove wrong new line and small English improvements (#885)
1 parent dba759e commit 8ef4869

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

info.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ path = "exercises/functions/functions5.rs"
114114
mode = "compile"
115115
hint = """
116116
This is a really common error that can be fixed by removing one character.
117-
It happens because Rust distinguishes between expressions and statements: expressions return
118-
a value based on its operand, and statements simply return a () type which behaves just like `void` in C/C++ language.
117+
It happens because Rust distinguishes between expressions and statements: expressions return a value based on their operand(s), and statements simply return a () type which behaves just like `void` in C/C++ language.
119118
We want to return a value of `i32` type from the `square` function, but it is returning a `()` type...
120119
They are not the same. There are two solutions:
121120
1. Add a `return` ahead of `num * num;`

0 commit comments

Comments
 (0)