Files
taskwarrior-2.x/rust/taskchampion/src/macros.rs
2022-05-08 19:39:02 +00:00

18 lines
386 B
Rust

#![macro_use]
/// Create a hashset, similar to vec!
// NOTE: in Rust 1.56.0, this can be changed to HashSet::from([..])
#[cfg(test)]
macro_rules! set(
{ $($key:expr),* $(,)? } => {
{
#[allow(unused_mut)]
let mut s = ::std::collections::HashSet::new();
$(
s.insert($key);
)*
s
}
};
);