Rust (programming language): Difference between revisions

Content deleted Content added
Restore type annotations for consistency and clarity. For some readers these types are not necessarily clear, and should be as clear as possible.
Line 151:
fn main() {
// This code would not compile without adding "mut".
let mut foo: i32 = 10;
println!("The value of foo is {foo}");
foo = 20;