Skip to content

Commit

Permalink
Add ZERO constant to integer, fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Sep 9, 2024
1 parent 53e87e9 commit 3404b22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/types/integer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ pub enum Integer {
Variable(Box<BigInt>),
}

impl Integer {
pub const ZERO: Self = Self::Primitive(0);
}

impl Default for Integer {
fn default() -> Self {
Self::Primitive(isize::default())
Expand Down

0 comments on commit 3404b22

Please sign in to comment.