std_macro_extensions/vector_deque/macro.rs
1/// Creates a new `VecDeque` instance.
2///
3/// This macro can be used in two forms:
4/// - Without arguments, it creates an empty `VecDeque`.
5/// - With elements, it creates a `VecDeque` initialized with the provided elements.
6#[macro_export]
7macro_rules! vector_deque {
8 () => {
9 std::collections::VecDeque::new()
10 };
11 ($($elem:expr),*) => {
12 std::collections::VecDeque::from([$($elem),*])
13 };
14}