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

In Rust, the = operator always represents a shallow copy (for types with move semantics, it will also statically invalidate the source) and there's no way to override this or otherwise permit user-defined code to run. Deep copying is done via a standard method, `.clone()`, which makes it obvious that user-defined code is running.


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

Search: