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

#[test]
fn test_cin_parse() {
    let input: &str = "1 2 3";
    let numbers: Vec<i32> = cin_parse!(input, Vec<i32>);
    assert_eq!(numbers, vec![1, 2, 3]);
    let single_input: &str = "12";
    let number: i32 = cin_parse!(single_input, i32);
    assert_eq!(number, 12);
}