Rust/The Rust Programming Language
[The Rust Programming Language] Ch. 3: Common Programming Concepts Variables and Mutability
3.1 Variables and Mutability By default, variables are immutable. Once the variable is set to immutable, you cannot change the value. Rust automatically finds the error and tries to fix it before compiling it. fn main() { let x = 5; println!("The value of x is: {x}"); x = 6; println!("The value of x is: {x}"); } $ cargo run Compiling variables v0.1.0 (file:///projects/variables) error[E0384]: ca..
[The Rust Programming Language] Ch. 2: Programming a Guessing Game
https://rust-book.cs.brown.edu/ch02-00-guessing-game-tutorial.html Programming a Guessing Game - The Rust Programming Language Let’s jump into Rust by working through a hands-on project together! This chapter introduces you to a few common Rust concepts by showing you how to use them in a real program. You’ll learn about let, match, methods, associated functions, external crat rust-book.cs.brown..