From 9b7b7d5ad753748e560848e2050287b4cb8ff767 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..c0a8cc291 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. +/// +/// # Panics +/// 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,