Derives Pod and Zeroable on Hash (#33256)

This commit is contained in:
Brooks 2023-09-15 07:27:30 -04:00 committed by GitHub
parent c1090d3959
commit 6481496564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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]);