constnumbigint

const

rust use const_num_bigint::{ConstBigUint,ConstBigInt,from_slice}; use num_bigint::{BigUint,BigInt,Sign}; const TEST_UINT : &'static ConstBigUint = &ConstBigUint::new( &from_slice![1,2,3,4,5] ); let biguint = BigUint::from_slice(&[1,2,3,4,5]); assert!(&biguint==TEST_UINT.to_biguint()); const TEST_INT : &'static ConstBigInt = &ConstBigInt::new( Sign::Plus, &from_slice![1,2,3,4,5] ); let bigint = BigInt::from_biguint(Sign::Plus,biguint); assert!(&bigint==TEST_INT.to_bigint());

License: MIT OR Apache-2.0