Skip to content

Commit

Permalink
simplify match
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Nov 30, 2021
1 parent 2ef47bb commit 9fc2947
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl ExecuteTimings {
}

type BankStatusCache = StatusCache<Result<()>>;
#[frozen_abi(digest = "7bCDimGo11ajw6ZHViBBu8KPfoDZBcwSnumWCU8MMuwr")]
#[frozen_abi(digest = "EJDh82SHRHkscKegmSFBGrk6Qc23L31Mn9XYprxh6EoJ")]
pub type BankSlotDelta = SlotDelta<Result<()>>;
type TransactionAccountRefCells = Vec<(Pubkey, Rc<RefCell<AccountSharedData>>)>;

Expand Down
23 changes: 4 additions & 19 deletions runtime/src/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,25 +208,10 @@ impl CostModel {
instruction: SystemInstruction,
) -> u64 {
match instruction {
SystemInstruction::CreateAccount {
lamports: _lamports,
space,
owner: _owner,
} => space,
SystemInstruction::CreateAccountWithSeed {
base: _base,
seed: _seed,
lamports: _lamports,
space,
owner: _owner,
} => space,
SystemInstruction::Allocate { space } => space,
SystemInstruction::AllocateWithSeed {
base: _base,
seed: _seed,
space,
owner: _owner,
} => space,
SystemInstruction::CreateAccount { space, .. }
| SystemInstruction::CreateAccountWithSeed { space, .. }
| SystemInstruction::Allocate { space }
| SystemInstruction::AllocateWithSeed { space, .. } => space,
SystemInstruction::Assign { .. }
| SystemInstruction::InitializeNonceAccount(_)
| SystemInstruction::WithdrawNonceAccount(_)
Expand Down

0 comments on commit 9fc2947

Please sign in to comment.