Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit ac02e0a

Browse files
change ceil div variable name (#3935)
1 parent 4ffbc72 commit ac02e0a

File tree

1 file changed

+4
-4
lines changed
  • token/program-2022/src/extension/transfer_fee

1 file changed

+4
-4
lines changed

token/program-2022/src/extension/transfer_fee/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ impl TransferFee {
3939
///
4040
/// Ceiling-division `ceil[ numerator / denominator ]` can be represented as a floor-division
4141
/// `floor[ (numerator + denominator - 1) / denominator ]`
42-
fn ceil_div(dividend: u128, divisor: u128) -> Option<u128> {
43-
dividend
44-
.checked_add(divisor)?
42+
fn ceil_div(numerator: u128, denominator: u128) -> Option<u128> {
43+
numerator
44+
.checked_add(denominator)?
4545
.checked_sub(1)?
46-
.checked_div(divisor)
46+
.checked_div(denominator)
4747
}
4848

4949
/// Calculate the transfer fee

0 commit comments

Comments
 (0)