Skip to content

Commit c50ed21

Browse files
fix: remove SizeOf implementation for Felt (#140)
1 parent ff3c89a commit c50ed21

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

crates/starknet-types-core/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ lambdaworks-math = { version = "0.10.0", default-features = false }
1515
num-traits = { version = "0.2", default-features = false }
1616
num-bigint = { version = "0.4", default-features = false }
1717
num-integer = { version = "0.1", default-features = false }
18-
size-of = { version = "0.1.5", default-features = false }
1918

2019
# Optional
2120
arbitrary = { version = "1.3", optional = true }

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use core::str::FromStr;
3131
use num_bigint::{BigInt, BigUint, Sign};
3232
use num_integer::Integer;
3333
use num_traits::{One, Zero};
34-
use size_of::SizeOf;
3534

3635
#[cfg(feature = "alloc")]
3736
pub extern crate alloc;
@@ -49,10 +48,6 @@ use lambdaworks_math::{
4948
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
5049
pub struct Felt(pub(crate) FieldElement<Stark252PrimeField>);
5150

52-
impl SizeOf for Felt {
53-
fn size_of_children(&self, _context: &mut size_of::Context) {}
54-
}
55-
5651
#[derive(Debug)]
5752
pub struct FromStrError(CreationError);
5853

@@ -796,7 +791,6 @@ mod test {
796791
use num_traits::Num;
797792
use proptest::prelude::*;
798793
use regex::Regex;
799-
use size_of::TotalSize;
800794

801795
#[test]
802796
fn test_debug_format() {
@@ -1358,15 +1352,4 @@ mod test {
13581352
assert_eq!(one, Felt::ONE);
13591353
assert_eq!(zero, Felt::ZERO);
13601354
}
1361-
1362-
#[test]
1363-
fn felt_size_of() {
1364-
assert_eq!(Felt::ZERO.size_of(), TotalSize::total(32));
1365-
assert_eq!(Felt::ONE.size_of(), TotalSize::total(32));
1366-
assert_eq!(
1367-
Felt(FieldElement::from(1600000000)).size_of(),
1368-
TotalSize::total(32)
1369-
);
1370-
assert_eq!(Felt::MAX.size_of(), TotalSize::total(32));
1371-
}
13721355
}

0 commit comments

Comments
 (0)