Skip to content

Commit

Permalink
fix: restrict try_add etc to super
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Nov 12, 2024
1 parent 0dad376 commit 11596ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/proof-of-sql/src/base/database/slice_operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::fmt::Debug;
use num_traits::ops::checked::{CheckedAdd, CheckedDiv, CheckedMul, CheckedSub};

/// Function for checked addition with overflow error handling
pub(crate) fn try_add<T>(l: &T, r: &T) -> ColumnOperationResult<T>
pub(super) fn try_add<T>(l: &T, r: &T) -> ColumnOperationResult<T>
where
T: CheckedAdd<Output = T> + Debug,
{
Expand All @@ -15,7 +15,7 @@ where
}

/// Function for checked subtraction with overflow error handling
pub(crate) fn try_sub<T>(l: &T, r: &T) -> ColumnOperationResult<T>
pub(super) fn try_sub<T>(l: &T, r: &T) -> ColumnOperationResult<T>
where
T: CheckedSub<Output = T> + Debug,
{
Expand All @@ -26,7 +26,7 @@ where
}

/// Function for checked multiplication with overflow error handling
pub(crate) fn try_mul<T>(l: &T, r: &T) -> ColumnOperationResult<T>
pub(super) fn try_mul<T>(l: &T, r: &T) -> ColumnOperationResult<T>
where
T: CheckedMul<Output = T> + Debug,
{
Expand All @@ -37,7 +37,7 @@ where
}

/// Function for checked division with division by zero error handling
pub(crate) fn try_div<T>(l: &T, r: &T) -> ColumnOperationResult<T>
pub(super) fn try_div<T>(l: &T, r: &T) -> ColumnOperationResult<T>
where
T: CheckedDiv<Output = T> + Debug,
{
Expand Down

0 comments on commit 11596ef

Please sign in to comment.