I just started learning Rust. The following code runs without error. May someone please explain why let (x,y) instead of let (mut x, mut y) is the correct code? I get a compiler warning saying mut x and mut y don't need to be mutable if I use the let (mut x, mut y) version.
Mutable is only required if you want to change the value. If you don't set any value in the beginning, then the first time you initialize it there is no previous value so mut is not required.