#![allow(dead_code, unused_macros)]
pub(crate) const OVERFLOW_MSG: &str = "overflow";
macro_rules! add {
($a:expr, $b:expr) => {
$a.checked_add($b).expect($crate::macros::OVERFLOW_MSG)
};
}
macro_rules! sub {
($a:expr, $b:expr) => {
$a.checked_sub($b).expect($crate::macros::OVERFLOW_MSG)
};
}
macro_rules! mul {
($a:expr, $b:expr) => {
$a.checked_mul($b).expect($crate::macros::OVERFLOW_MSG)
};
}
macro_rules! div {
($a:expr, $b:expr) => {
$a.checked_div($b).expect($crate::macros::OVERFLOW_MSG)
};
}
macro_rules! shr {
($a:expr, $b:expr) => {
$a.checked_shr($b).expect($crate::macros::OVERFLOW_MSG)
};
}
macro_rules! shl {
($a:expr, $b:expr) => {
$a.checked_shl($b).expect($crate::macros::OVERFLOW_MSG)
};
}