AccountSharedData::serialize (#23685)
This commit is contained in:
committed by
GitHub
parent
66b1f55351
commit
bb9f9c8dd5
@@ -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