AccountSharedData::serialize (#23685)
This commit is contained in:
committed by
GitHub
parent
66b1f55351
commit
bb9f9c8dd5
@@ -12,6 +12,7 @@ edition = "2021"
|
||||
[dependencies]
|
||||
bs58 = "0.4.0"
|
||||
bv = { version = "0.11.1", features = ["serde"] }
|
||||
lazy_static = "1.4.0"
|
||||
log = "0.4.14"
|
||||
serde = "1.0.136"
|
||||
serde_derive = "1.0.103"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
use {
|
||||
crate::abi_digester::{AbiDigester, DigestError, DigestResult},
|
||||
lazy_static::lazy_static,
|
||||
log::*,
|
||||
serde::Serialize,
|
||||
std::any::type_name,
|
||||
@@ -402,6 +403,18 @@ impl<T: AbiExample> AbiExample for Vec<T> {
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
/// we need &Vec<u8>, so we need something with a static lifetime
|
||||
static ref VEC_U8: Vec<u8> = vec![u8::default()];
|
||||
}
|
||||
|
||||
impl AbiExample for &Vec<u8> {
|
||||
fn example() -> Self {
|
||||
info!("AbiExample for (&Vec<T>): {}", type_name::<Self>());
|
||||
&*VEC_U8
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AbiExample> AbiExample for VecDeque<T> {
|
||||
fn example() -> Self {
|
||||
info!("AbiExample for (Vec<T>): {}", type_name::<Self>());
|
||||
|
Reference in New Issue
Block a user