
Rust
Shadowing in Rust and When It Beats Mutation Explained
Shadowing re-binds a name with let, even to a new type, while mut changes a value in place. See when each is the right tool and the one trap that surprises people.
7 min read
Tag
1 post

Shadowing re-binds a name with let, even to a new type, while mut changes a value in place. See when each is the right tool and the one trap that surprises people.