Skip to content

Commit 1901417

Browse files
committed
added default to SignedBigInt
1 parent ddb9805 commit 1901417

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ff/src/biginteger/signed.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ pub struct SignedBigInt<const N: usize> {
2020
pub is_positive: bool,
2121
}
2222

23+
impl<const N: usize> Default for SignedBigInt<N> {
24+
#[inline]
25+
fn default() -> Self {
26+
Self::zero()
27+
}
28+
}
29+
2330
pub type S64 = SignedBigInt<1>;
2431
pub type S128 = SignedBigInt<2>;
2532
pub type S192 = SignedBigInt<3>;

0 commit comments

Comments
 (0)