Skip to content

Commit

Permalink
fix: add panic doc to scale_and_subtract_literal
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Nov 4, 2024
1 parent d32a469 commit 6178bc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/proof-of-sql/src/sql/proof_exprs/comparison_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S: Scalar>(
lhs: &LiteralValue<S>,
Expand Down

0 comments on commit 6178bc8

Please sign in to comment.