From 5045db700a8ed30b9b73d36142c87ba5a0327f96 Mon Sep 17 00:00:00 2001 From: Chad Dougherty Date: Fri, 26 Oct 2018 16:22:23 -0400 Subject: [PATCH] Update functions5.rs simple typo: solusions -> solutions --- functions/functions5.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/functions5.rs b/functions/functions5.rs index da6b6f9..d3ff002 100644 --- a/functions/functions5.rs +++ b/functions/functions5.rs @@ -42,6 +42,6 @@ fn square(num: i32) -> i32 { // It happens because Rust distinguishes between expressions and statements: expressions return // a value based on its operand, and statements simply return a () type which behaves just like `void` in C/C++ language. // We want to return a value of `i32` type from the `square` function, but it is returning a `()` type... -// They are not the same. There are two solusions: +// They are not the same. There are two solutions: // 1. Add a `return` ahead of `num * num;` // 2. remove `;`, make it to be `num * num`