Derives Pod and Zeroable on Hash (#33256)
This commit is contained in:
parent
c1090d3959
commit
6481496564
|
@ -6,6 +6,7 @@
|
||||||
use {
|
use {
|
||||||
crate::{sanitize::Sanitize, wasm_bindgen},
|
crate::{sanitize::Sanitize, wasm_bindgen},
|
||||||
borsh::{BorshDeserialize, BorshSchema, BorshSerialize},
|
borsh::{BorshDeserialize, BorshSchema, BorshSerialize},
|
||||||
|
bytemuck::{Pod, Zeroable},
|
||||||
sha2::{Digest, Sha256},
|
sha2::{Digest, Sha256},
|
||||||
std::{convert::TryFrom, fmt, mem, str::FromStr},
|
std::{convert::TryFrom, fmt, mem, str::FromStr},
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
|
@ -42,6 +43,8 @@ const MAX_BASE58_LEN: usize = 44;
|
||||||
PartialOrd,
|
PartialOrd,
|
||||||
Hash,
|
Hash,
|
||||||
AbiExample,
|
AbiExample,
|
||||||
|
Pod,
|
||||||
|
Zeroable,
|
||||||
)]
|
)]
|
||||||
#[repr(transparent)]
|
#[repr(transparent)]
|
||||||
pub struct Hash(pub(crate) [u8; HASH_BYTES]);
|
pub struct Hash(pub(crate) [u8; HASH_BYTES]);
|
||||||
|
|
Loading…
Reference in New Issue