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
/// Creates a new BTreeMap instance.
///
/// # Arguments
///
/// - `expr` - The key-value pairs to initialize the BTreeMap.
///
/// # Returns
///
/// - `BTreeMap<K, V>` - A new BTreeMap containing the given key-value pairs.
#[macro_export]
macro_rules! b_tree_map {
    () => {
        std::collections::BTreeMap::new()
    };
    ($($key:expr => $val:expr),*) => {{
        let mut map = std::collections::BTreeMap::new();
        $( map.insert($key, $val); )*
        map
    }};
}