summaryrefslogtreecommitdiff
path: root/exercises/functions/functions5.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-23 10:25:48 +0000
committerbors <bors@rust-lang.org>2019-06-23 10:25:48 +0000
commit5f16469807147a2b4bd2e7cb072e7c3f0e96703f (patch)
tree59bb9dccc31695a74f8c8b316d519e3c0b3f9718 /exercises/functions/functions5.rs
parent752bc27e2bf166743be95508fefa9a15b247570b (diff)
parenteb13c2b6afd4ae22370698561478e27c8633a918 (diff)
Auto merge of #171 - miller-time:rustfmt-exercises, r=komaeda
chore: Clean up some formatting in exercises I noticed some formatting that isn't consistent with the `rustfmt` style and tried my best to run it on the files in the exercises directory (which does fail for files that can't compile!), which just caught some minor whitespace things here and there. Note: also can't just apply `rustfmt` blindly because of the blank lines that lead to the hint comments
Diffstat (limited to 'exercises/functions/functions5.rs')
-rw-r--r--exercises/functions/functions5.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/functions/functions5.rs b/exercises/functions/functions5.rs
index d3ff002..d9227c9 100644
--- a/exercises/functions/functions5.rs
+++ b/exercises/functions/functions5.rs
@@ -40,7 +40,7 @@ fn square(num: i32) -> i32 {
// This is a really common error that can be fixed by removing one character.
// 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.
+// 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 solutions:
// 1. Add a `return` ahead of `num * num;`