checked_math: use a panic
This reduces compute use further and still produces good error messages.
This commit is contained in:
parent
38d239462f
commit
2502f0ac1b
|
@ -11,8 +11,7 @@ pub(crate) use zip;
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! checked_math {
|
macro_rules! checked_math {
|
||||||
($x: expr) => {
|
($x: expr) => {
|
||||||
checked_math::checked_math!($x)
|
checked_math::checked_math!($x).unwrap_or_else(|| panic!("math error"))
|
||||||
.ok_or_else(|| error!(crate::error::MangoError::MathError))?
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
pub(crate) use checked_math;
|
pub(crate) use checked_math;
|
||||||
|
|
Loading…
Reference in New Issue