Skip to content

v0.7.1

Choose a tag to compare

@maoueh maoueh released this 10 Jan 00:46

Changed

  • Bumped minimum Rust version to 1.83.

Added

  • Added AddAssign (+=) and SubAssign (-=) trait implementations for BigDecimal and BigInt, enabling in-place mutation operations.
    • For BigDecimal:
      • AddAssign and SubAssign for BigDecimal, &BigDecimal, and BigInt
      • Specialized implementations for all primitive integer types (i8, i16, i32, i64, i128, isize, u8, u16, u32, u64, u128, usize)
    • For BigInt:
      • AddAssign and SubAssign for BigInt and &BigInt
      • Specialized implementations for all primitive integer types
    • Example usage:
      let mut balance = BigDecimal::from(100);
      balance += 50;                    // Primitive integers
      balance -= BigInt::from(25);      // BigInt values
      
      let mut count = BigInt::from(1000);
      count += 100;                     // Works for BigInt too
      count -= BigInt::from(50);