Skip to content

Commit

Permalink
Derives Pod and Zeroable on Hash (solana-labs#33256)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Sep 15, 2023
1 parent c1090d3 commit 6481496
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/program/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use {
crate::{sanitize::Sanitize, wasm_bindgen},
borsh::{BorshDeserialize, BorshSchema, BorshSerialize},
bytemuck::{Pod, Zeroable},
sha2::{Digest, Sha256},
std::{convert::TryFrom, fmt, mem, str::FromStr},
thiserror::Error,
Expand Down Expand Up @@ -42,6 +43,8 @@ const MAX_BASE58_LEN: usize = 44;
PartialOrd,
Hash,
AbiExample,
Pod,
Zeroable,
)]
#[repr(transparent)]
pub struct Hash(pub(crate) [u8; HASH_BYTES]);
Expand Down

0 comments on commit 6481496

Please sign in to comment.