Skip to content

Commit be520fe

Browse files
authored
fix: Add Arbitrary size hint (#132)
1 parent a4b2dff commit be520fe

File tree

1 file changed

+5
-0
lines changed
  • crates/starknet-types-core/src/felt

1 file changed

+5
-0
lines changed

crates/starknet-types-core/src/felt/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ impl Arbitrary<'_> for Felt {
463463
let felt = FieldElement::new(uint);
464464
Ok(Felt(felt))
465465
}
466+
467+
#[inline]
468+
fn size_hint(depth: usize) -> (usize, Option<usize>) {
469+
<[u64; 4]>::size_hint(depth)
470+
}
466471
}
467472

468473
/// Allows transparent binary serialization of Felts with `parity_scale_codec`.

0 commit comments

Comments
 (0)