Skip to content

Commit de40b5a

Browse files
committed
Add BigDecimalRef::as_parts method
1 parent 6b976d3 commit de40b5a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,6 +2067,12 @@ impl BigDecimalRef<'_> {
20672067
count_decimal_digits_uint(self.digits)
20682068
}
20692069

2070+
/// Split into components
2071+
#[allow(dead_code)]
2072+
pub(crate) fn as_parts(&self) -> (Sign, i64, &BigUint) {
2073+
(self.sign, self.scale, self.digits)
2074+
}
2075+
20702076
/// Take absolute value of the decimal (non-negative sign)
20712077
pub fn abs(&self) -> Self {
20722078
Self {

0 commit comments

Comments
 (0)