diff --git a/crates/starknet-types-core/Cargo.toml b/crates/starknet-types-core/Cargo.toml index f603f359..ee3dc798 100644 --- a/crates/starknet-types-core/Cargo.toml +++ b/crates/starknet-types-core/Cargo.toml @@ -15,7 +15,6 @@ lambdaworks-math = { version = "0.10.0", default-features = false } num-traits = { version = "0.2", default-features = false } num-bigint = { version = "0.4", default-features = false } num-integer = { version = "0.1", default-features = false } -size-of = { version = "0.1.5", default-features = false } # Optional arbitrary = { version = "1.3", optional = true } diff --git a/crates/starknet-types-core/src/felt/mod.rs b/crates/starknet-types-core/src/felt/mod.rs index fa0b39a5..fc4fe41f 100644 --- a/crates/starknet-types-core/src/felt/mod.rs +++ b/crates/starknet-types-core/src/felt/mod.rs @@ -31,7 +31,6 @@ use core::str::FromStr; use num_bigint::{BigInt, BigUint, Sign}; use num_integer::Integer; use num_traits::{One, Zero}; -use size_of::SizeOf; #[cfg(feature = "alloc")] pub extern crate alloc; @@ -49,10 +48,6 @@ use lambdaworks_math::{ #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Felt(pub(crate) FieldElement); -impl SizeOf for Felt { - fn size_of_children(&self, _context: &mut size_of::Context) {} -} - #[derive(Debug)] pub struct FromStrError(CreationError); @@ -796,7 +791,6 @@ mod test { use num_traits::Num; use proptest::prelude::*; use regex::Regex; - use size_of::TotalSize; #[test] fn test_debug_format() { @@ -1358,15 +1352,4 @@ mod test { assert_eq!(one, Felt::ONE); assert_eq!(zero, Felt::ZERO); } - - #[test] - fn felt_size_of() { - assert_eq!(Felt::ZERO.size_of(), TotalSize::total(32)); - assert_eq!(Felt::ONE.size_of(), TotalSize::total(32)); - assert_eq!( - Felt(FieldElement::from(1600000000)).size_of(), - TotalSize::total(32) - ); - assert_eq!(Felt::MAX.size_of(), TotalSize::total(32)); - } }