add pair_of! macro
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
f698254c41
commit
e161e5dd61
1 changed files with 11 additions and 0 deletions
|
@ -84,6 +84,17 @@ macro_rules! apply {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! pair_of {
|
||||||
|
($decl:ty) => {
|
||||||
|
($decl, $decl)
|
||||||
|
};
|
||||||
|
|
||||||
|
($init:expr) => {
|
||||||
|
($init, $init)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/// Functor for truthy
|
/// Functor for truthy
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! is_true {
|
macro_rules! is_true {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue