➡️ Rust Moves

= operations like assigning a value to a variable, passing it to a function or returning it from a function1


  • simple types (int, float…) don’t get moved since they are copy types
  • whenever you perform an operation with a value, it actually gets moved from the previous owner to the new one
  • → use borrowing if you with to read only


  1. Programming Rust, 2nd Edition