We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cf2196 commit f91db6bCopy full SHA for f91db6b
src/bigint.rs
@@ -274,6 +274,11 @@ impl One for BigInt {
274
fn one() -> BigInt {
275
BigInt::from_biguint(Plus, One::one())
276
}
277
+
278
+ #[inline]
279
+ fn is_one(&self) -> bool {
280
+ self.sign == Plus && self.data.is_one()
281
+ }
282
283
284
impl Signed for BigInt {
src/biguint.rs
@@ -415,6 +415,11 @@ impl One for BigUint {
415
fn one() -> BigUint {
416
BigUint::new(vec![1])
417
418
419
420
421
+ self.data[..] == [1]
422
423
424
425
impl Unsigned for BigUint {}
0 commit comments