Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ownership of the String is moved and the original variable cannot be used until it is reinitialised, it is not copied. Pass by value is literally always a shallow byte copy in Rust (not following pointers) and the Rust compiler must disallow further use of many variables to ensure safety.


Right! Thank you!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: