Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzman committed Aug 1, 2024
1 parent 0cf5f7e commit bd88579
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
12 changes: 2 additions & 10 deletions transaction/summary/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,7 @@ impl<const RECORDS: usize, const TOTALS: usize> TransactionReport
.find(|(t, k, _)| t == &token_id && *k == TotalKind::Ours)
{
// If we have an entry, subtract the change value from this
Some(v) => {
v.2 =
v.2.checked_sub(value)
.ok_or(Error::NumericOverflow)?
}
Some(v) => v.2 = v.2.checked_sub(value).ok_or(Error::NumericOverflow)?,
// If we do not, create a new entry
None => self
.totals
Expand All @@ -216,11 +212,7 @@ impl<const RECORDS: usize, const TOTALS: usize> TransactionReport
.find(|(t, k, _)| t == &token_id && *k == TotalKind::Sci)
{
// If we have an entry, add the value to this
Some(v) => {
v.2 =
v.2.checked_add(value)
.ok_or(Error::NumericOverflow)?
}
Some(v) => v.2 = v.2.checked_add(value).ok_or(Error::NumericOverflow)?,
// If we do not, create a new entry
None => self
.totals
Expand Down
3 changes: 1 addition & 2 deletions transaction/summary/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ impl TxSummaryStreamingVerifierCtx {
report.change_sub(amount)?;
} else {
// Otherwise, add this as an output to ourself
report
.output_add(TransactionEntity::OurAddress(*address_hash), amount)?;
report.output_add(TransactionEntity::OurAddress(*address_hash), amount)?;
}
} else {
// If we _don't_ have address information but it's to our own address...
Expand Down

0 comments on commit bd88579

Please sign in to comment.