Mark function constant

Allow this function to be called elsewhere in the codebase in const
context.
This commit is contained in:
yancy 2025-05-05 07:16:42 -05:00
parent 6737c3a0e5
commit 002a0382aa
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ pub struct NumOpError(MathOp);
impl NumOpError {
/// Creates a [`NumOpError`] caused by `op`.
pub(crate) fn while_doing(op: MathOp) -> Self { NumOpError(op) }
pub(crate) const fn while_doing(op: MathOp) -> Self { NumOpError(op) }
/// Returns `true` if this operation error'ed due to overflow.
pub fn is_overflow(self) -> bool { self.0.is_overflow() }