Hacker News new | past | comments | ask | show | jobs | submit login

The only runtime performance cost here is one you would need regardless for correctness- you only need to copy if you're going to hold onto the data longer than a borrow would allow.

In fact, Rust's semantics allows a fewer number of copies than naive use of std::string, since an already-owned value won't be copied, as mentioned above.




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

Search: