Crates.io | arc_macro |
lib.rs | arc_macro |
version | 0.1.0 |
created_at | 2025-01-14 21:11:20.799669+00 |
updated_at | 2025-01-14 21:11:20.799669+00 |
description | A macro wrapper around Arc::new() for convenience |
homepage | |
repository | https://github.com/Jstone751/arc_macro |
max_upload_size | |
id | 1516677 |
size | 2,511 |
A simple crate providing one convenience macro for creating an Arc[T]
. This crate is based off this video by Logan Smith and a subsequent comment on it from @Choroalp. The entire concept of this is that Arc[T]
is a very useful tool, however the convenience of simply using vec![]
is too powerful. Thus, the arc![]
macro is born! For the pros of using Arc
over Vec
, please check out the aforementioned video.
let my_arc = arc![1, 2, 3];
That's it, no hassle, no nothing. It's just a wrapper for Arc::new()
.