Closed
Description
There is a code example in section 0.7.1 of the Guide (http://static.rust-lang.org/doc/master/guide.html#expressions-vs.-statements), which could be improved.
We use this:
let mut x = 0i;
let y = x = 5i;
But, in my opinion, it would be better to use this (avoids making x mutable):
let x;
let y = x = 5i;
Is there a reason why we prefer the first code snippet instead of the second? I could submit a PR to fix it.
Metadata
Metadata
Assignees
Labels
No labels