Skip to content

Commit

Permalink
fix less
Browse files Browse the repository at this point in the history
  • Loading branch information
jack committed Jun 27, 2024
1 parent eab82b7 commit e480eaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions invoice/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl OwnedFraction {
Some(())
}
}

impl KnownState for OwnedFraction {}

#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug, Default, Display)]
Expand Down
4 changes: 2 additions & 2 deletions src/interface/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ impl StateChange for OwnedFractionChange {
OwnedFractionChange::Inc(pos) => OwnedFractionChange::Inc(*pos + add),
OwnedFractionChange::Zero => OwnedFractionChange::Inc(add),
OwnedFractionChange::Dec(neg) => match add.cmp(neg) {
Ordering::Greater => OwnedFractionChange::Dec(*neg - add),
Ordering::Less => OwnedFractionChange::Dec(*neg - add),
Ordering::Equal => OwnedFractionChange::Zero,
Ordering::Less => OwnedFractionChange::Inc(add - *neg),
Ordering::Greater => OwnedFractionChange::Inc(add - *neg),

Check warning on line 174 in src/interface/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/interface/contract.rs#L167-L174

Added lines #L167 - L174 were not covered by tests
},
};
}

Check warning on line 177 in src/interface/contract.rs

View check run for this annotation

Codecov / codecov/patch

src/interface/contract.rs#L177

Added line #L177 was not covered by tests
Expand Down

0 comments on commit e480eaf

Please sign in to comment.