From 9bdb0a12e45a8e9f9f6a4bd4a9c172c5376c7f60 Mon Sep 17 00:00:00 2001 From: marisa Date: Mon, 11 Nov 2019 16:51:38 +0100 Subject: feat: Refactor hint system Hints are now accessible using the CLI subcommand `rustlings hint i32 { num * num; } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// 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. -// 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;` -// 2. remove `;`, make it to be `num * num` -- cgit v1.2.3