The Rust SuperpowerReferences & Borrowing
All courses

Borrow instead of move

&T is an immutable reference. You can read without taking ownership. One mutable borrow OR many immutable borrows — never both at once.

The borrow checker is Rust's bouncer. It has never lost a fight.

Output
Press Run to execute your code.