1 month ago
21 lines583 B
Lesson 2: Ownership: who frees the memory
Ownership: who frees the memory comes up in almost every real Rust project. We start with the why, then write code together.
Read the full lesson: https://glibcode.net/courses/rust-ownership/lessons/2
Files
src/main.rs: moves: why the first String is gone
Tip:
cargo checkis much faster thancargo buildwhile you are still fixing errors.
Run it
cargo run
Exercises
See exercises.md. Ask in the forum after you have tried.