Skip to content

Commit

Permalink
Removes redundant casts in StorableAccounts impls
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Oct 18, 2023
1 parent db9a637 commit 2a62ecd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions accounts-db/src/storable_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>>
true
}
fn hash(&self, index: usize) -> &AccountHash {
bytemuck::cast_ref(self.account(index).hash())
self.account(index).hash()
}
fn write_version(&self, index: usize) -> u64 {
self.account(index).write_version()
Expand Down Expand Up @@ -282,7 +282,7 @@ impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>> for StorableAccountsBySlot<
true
}
fn hash(&self, index: usize) -> &AccountHash {
bytemuck::cast_ref(self.account(index).hash())
self.account(index).hash()
}
fn write_version(&self, index: usize) -> u64 {
self.account(index).write_version()
Expand Down Expand Up @@ -322,7 +322,7 @@ impl<'a> StorableAccounts<'a, StoredAccountMeta<'a>>
true
}
fn hash(&self, index: usize) -> &AccountHash {
bytemuck::cast_ref(self.account(index).hash())
self.account(index).hash()
}
fn write_version(&self, index: usize) -> u64 {
self.account(index).write_version()
Expand Down

0 comments on commit 2a62ecd

Please sign in to comment.