README for this exercise
The solution I found for this was to add let to line 9 using shadowing. This came from the page linked to in the hint.
You don't even need block scope to shadow the variables, it works in the same scope simply by using let number = "something", which blends in the new value.
According to the docs we can use let
again aka "shadowing" within the same scope to re-assign the variable. This removes the need for the extra curly braces and scope.
By using let, we can perform a few transformations on a value but have the variable be immutable after those transformations have been completed. The other difference between mut and shadowing is that because we’re effectively creating a new variable when we use the let keyword again, we can change the type of the value but reuse the same name.
fn main() {
let number = "3"; // don't change this line
println!("Number {}", number);
let number = 3; // shadow the variable number, add let
println!("Number {}", number);
}
Hope this helps.