3 ms·
While in Rust I can assign string to foo and then update it with int When do you need to do that? Can you give an example?
by iainmerrick 2y ago
While in Rust I can assign string to foo and then update it with int
When do you need to do that? Can you give an example?
- steveklabnik 2y agoI suspect they're talking about shadowing. You can't change the type of an existing variable, but you can create a new variable with the same name but a different type.