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

Right now the derive macro requires `T` be `Clone`, but what we actually want to require is only that each field is clone, including those that are generic over `T`. eg `Arc<T>` is `Clone` even though `T` isn't, so the correct restriction would be to require `Arc<T>: Clone` instead of the status quo which requires `T: Clone`


This is the best explanation I've read of this limitation


Thank you, summarized perfectly.




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

Search: