ThorstenHans / blog-comments

0 stars 0 forks source link

shadowing-temporary-mutability-rust/ #16

Open utterances-bot opened 12 months ago

utterances-bot commented 12 months ago

Shadowing and Temporary Mutability in Rust · Thorsten Hans' blog

Shadowing and temporary mutability are small language fundamentals that make your code more robust and correct. They also make learning Rust fun.

https://www.thorsten-hans.com/shadowing-temporary-mutability-rust/

wiktorwandachowicz commented 12 months ago
let mut age = 30; // age is mutable
let age = age;    // age is immutable by shadowig

This is golden!