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

The common scenario for f and g to consume x is that x is a smart pointer type e.g. Rc/Arc.

to make it clear that the clone is "cheap", some Rust developer prefer using `Arc::Clone(&x)` over `x.clone()`.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: