fix: use debug fmt for nested arrays (#527)

This commit is contained in:
Matthias Seitz 2021-10-24 16:02:06 +02:00 committed by GitHub
parent dbd3929b74
commit b072b05515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,7 @@ pub(crate) fn derive_eth_display_impl(input: DeriveInput) -> Result<TokenStream,
quote! {
write!(f, "[")?;
for (idx, val) in self.#ident.iter().enumerate() {
write!(f, "{}", val)?;
write!(f, "{:?}", val)?;
if idx < self.#ident.len() - 1 {
write!(f, ", ")?;
}

View File

@ -441,6 +441,8 @@ fn can_derive_ethcall() {
i: I256,
arr_u8: [u8; 32],
arr_u16: [u16; 32],
nested_arr: [[u8; 32]; 2],
double_nested: [[[u8; 32]; 2]; 3],
v: Vec<u8>,
}