checked_math: use a panic

This reduces compute use further and still produces good error messages.
This commit is contained in:
Christian Kamm 2022-03-14 12:45:32 +01:00
parent 38d239462f
commit 2502f0ac1b
1 changed files with 1 additions and 2 deletions

View File

@ -11,8 +11,7 @@ pub(crate) use zip;
#[macro_export]
macro_rules! checked_math {
($x: expr) => {
checked_math::checked_math!($x)
.ok_or_else(|| error!(crate::error::MangoError::MathError))?
checked_math::checked_math!($x).unwrap_or_else(|| panic!("math error"))
};
}
pub(crate) use checked_math;