Skip to content

Commit 5045db7

Browse files
author
Chad Dougherty
authored
Update functions5.rs
simple typo: solusions -> solutions
1 parent d4ab3f2 commit 5045db7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/functions5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ fn square(num: i32) -> i32 {
4242
// It happens because Rust distinguishes between expressions and statements: expressions return
4343
// a value based on its operand, and statements simply return a () type which behaves just like `void` in C/C++ language.
4444
// 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:
45+
// They are not the same. There are two solutions:
4646
// 1. Add a `return` ahead of `num * num;`
4747
// 2. remove `;`, make it to be `num * num`

0 commit comments

Comments
 (0)