3 ms·
Why, macros that put Arc<Box<T>> everywhere might just be it.
by nine_k 1y ago
Why, macros that put Arc<Box<T>> everywhere might just be it.
- lblume 1y agoArc<Box<T>> is redundant, for the contents of the Arc are already stored on the heap. You may be thinking of Arc<Mutex<T>> for multithreaded access or Rc<RefCell<T>> for singlethreaded access. Both enable the same "feature" of moving the compile-time borrow checking to runtime (Mutex/RefCell) and using reference-counting instead of direct ownership (Arc/Rc).