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
10
11
12
use crate::*;

#[test]
fn test_vec() {
    let empty_vector: Vec<i32> = vector!();
    assert!(empty_vector.is_empty());
    let numbers: Vec<i32> = vector!(1, 2, 3);
    assert_eq!(numbers.len(), 3);
    assert_eq!(numbers[0], 1);
    assert_eq!(numbers[1], 2);
    assert_eq!(numbers[2], 3);
}