Sdk: start to appease clippy's integer arithmetic check (#15736)
* Move to module-level clippy allowance * Fix stake_weighted_timestamp math * Fix genesis_config * Fix shred_version * Fix hard_forks * Fix process_instruction * Add ArithmeticOverflow ix error * Fix nonce_keyed_account * Update BankSlotDelta frozen abi due to new ix error
This commit is contained in:
@@ -292,11 +292,11 @@ impl Default for MockInvokeContext {
|
||||
}
|
||||
impl InvokeContext for MockInvokeContext {
|
||||
fn push(&mut self, _key: &Pubkey) -> Result<(), InstructionError> {
|
||||
self.invoke_depth += 1;
|
||||
self.invoke_depth = self.invoke_depth.saturating_add(1);
|
||||
Ok(())
|
||||
}
|
||||
fn pop(&mut self) {
|
||||
self.invoke_depth -= 1;
|
||||
self.invoke_depth = self.invoke_depth.saturating_sub(1);
|
||||
}
|
||||
fn invoke_depth(&self) -> usize {
|
||||
self.invoke_depth
|
||||
|
Reference in New Issue
Block a user