Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
fix: use debug fmt for nested arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Oct 24, 2021
1 parent dbd3929 commit 873d6d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ethers-contract/ethers-contract-derive/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, ", ")?;
}
Expand Down
2 changes: 2 additions & 0 deletions ethers-contract/tests/common/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}

Expand Down

0 comments on commit 873d6d7

Please sign in to comment.