Hacker News new | ask | show | jobs
by _answ 651 days ago
Simple != idiomatic. It's perfectly idiomatic to `Arc<Mutex<Box>>` in Rust, and it is more complex because it deals with more concerns than a simple reference, namely being thread-safe. Sometimes you need that, sometimes not, but you have to be explicit about it.
1 comments

There’s no reason to have a Box<T> there, because Arc already boxes.