2022-03-04 05:30:53 -08:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! zip {
|
|
|
|
($x: expr) => ($x);
|
|
|
|
($x: expr, $($y: expr), +) => (
|
|
|
|
$x.zip(
|
|
|
|
zip!($($y), +))
|
|
|
|
)
|
2022-03-02 21:15:28 -08:00
|
|
|
}
|
2022-03-04 05:30:53 -08:00
|
|
|
pub(crate) use zip;
|
2022-03-11 00:57:30 -08:00
|
|
|
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! checked_math {
|
|
|
|
($x: expr) => {
|
2022-03-14 04:45:32 -07:00
|
|
|
checked_math::checked_math!($x).unwrap_or_else(|| panic!("math error"))
|
2022-03-11 00:57:30 -08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
pub(crate) use checked_math;
|