From 6178bc862b2c85af69e6649601d97f76e79a0f4b Mon Sep 17 00:00:00 2001 From: Ian Joiner <14581281+iajoiner@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:27:36 -0500 Subject: [PATCH] fix: add panic doc to `scale_and_subtract_literal` --- .../proof-of-sql/src/sql/proof_exprs/comparison_util.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/proof-of-sql/src/sql/proof_exprs/comparison_util.rs b/crates/proof-of-sql/src/sql/proof_exprs/comparison_util.rs index 00344bc56..688e7e195 100644 --- a/crates/proof-of-sql/src/sql/proof_exprs/comparison_util.rs +++ b/crates/proof-of-sql/src/sql/proof_exprs/comparison_util.rs @@ -31,12 +31,12 @@ fn unchecked_subtract_impl<'a, S: Scalar>( Ok(result) } -#[allow( - clippy::missing_panics_doc, - reason = "precision and scale are validated prior to calling this function, ensuring no panic occurs" -)] /// Scale LHS and RHS to the same scale if at least one of them is decimal /// and take the difference. This function is used for comparisons. +/// +/// # Panic +/// This function will panic if `lhs` and `rhs` have [`ColumnType`]s that are not comparable +/// or if we have precision overflow issues. #[allow(clippy::cast_sign_loss)] pub fn scale_and_subtract_literal( lhs: &LiteralValue,