u/alsurenin r/rust • Recommends
On “Just had a major Rust appreciation moment”
Cloning and `Arc<Mutex<>>`ing is *fine*. Especially in async application code, where the networking overheads often dominate.
link to this video is my favourite recent video on this topic (especially the hints for new developers section at the end).
That said, I would be curious to see an example of code that you are unhappy with, because *sometimes* these nagging feelings are a hint that there is a simplifying refactor to your data model that's lurking just around the corner, and it's so satisfying when you find them.