Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/starknet-types-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
17 changes: 0 additions & 17 deletions crates/starknet-types-core/src/felt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -49,10 +48,6 @@ use lambdaworks_math::{
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Felt(pub(crate) FieldElement<Stark252PrimeField>);

impl SizeOf for Felt {
fn size_of_children(&self, _context: &mut size_of::Context) {}
}

#[derive(Debug)]
pub struct FromStrError(CreationError);

Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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));
}
}