forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use std::num::Saturating over saturating_add_assign!() (solana-labs#523)
std::num::Saturating allows us to create integers that will override the standard arithmetic operators to use saturating math. This removes the need for a custom macro as well as reduces mental load as someone only needs to remember that they want saturating math once. This PR introduces std::num::Saturating integers to replace all use of saturating_add_assign!() in the accounts-db crate
- Loading branch information
Showing
2 changed files
with
90 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.