std-macro-extensions 1.0.1

A collection of macro extensions for Rust's standard library data structures, simplifying the creation and manipulation of common collections such as HashMap, Vec, and more.
Documentation
1
2
3
4
5
6
7
8
9
use crate::*;

#[test]
fn test_ref_cell() {
    let my_refcell: RefCell<i32> = refcell!(5);
    assert_eq!(*my_refcell.borrow(), 5);
    my_refcell.replace(10);
    assert_eq!(*my_refcell.borrow(), 10);
}