Abstract
- A list of Rust syntax that worth noting
Rust Variable
Rust: Difference between Constant and Variable
constcan be used in the Global State(stored in the Data Segment), andletcan only be used in a function(Stored in the Stack Segment)
Rust: Variable Shadowing
- Allowing us to reuse the same variable name, assign a different type of change the value (so we donβt need to think of a new variable name) of a Immutability variable (add in a degree of flexibility)
- Works on both
letandlet mut, but noconst - Refer to Rust Variable Shadowing for more details
