Skip to content

Commit

Permalink
Revert "Revert "fix: primitive len""
Browse files Browse the repository at this point in the history
This reverts commit cea8102.
  • Loading branch information
Larkooo committed Nov 14, 2024
1 parent 155033d commit 4e921c3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/dojo/types/src/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ impl Primitive {
Primitive::Bool(bool) => format!("{}", bool.unwrap_or_default() as i32),

// Hex string
Primitive::I128(i128) => format!("{:#064x}", i128.unwrap_or_default()),
Primitive::ContractAddress(felt) => format!("{:#064x}", felt.unwrap_or_default()),
Primitive::ClassHash(felt) => format!("{:#064x}", felt.unwrap_or_default()),
Primitive::Felt252(felt) => format!("{:#064x}", felt.unwrap_or_default()),
Primitive::U128(u128) => format!("{:#064x}", u128.unwrap_or_default()),
Primitive::U64(u64) => format!("{:#064x}", u64.unwrap_or_default()),
Primitive::I128(i128) => format!("0x{:064x}", i128.unwrap_or_default()),
Primitive::ContractAddress(felt) => format!("0x{:064x}", felt.unwrap_or_default()),
Primitive::ClassHash(felt) => format!("0x{:064x}", felt.unwrap_or_default()),
Primitive::Felt252(felt) => format!("0x{:064x}", felt.unwrap_or_default()),
Primitive::U128(u128) => format!("0x{:064x}", u128.unwrap_or_default()),
Primitive::U64(u64) => format!("0x{:064x}", u64.unwrap_or_default()),

Primitive::U256(u256) => format!("0x{:064x}", u256.unwrap_or_default()),
}
Expand Down

0 comments on commit 4e921c3

Please sign in to comment.