Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Dec 21, 2023
1 parent 56cae56 commit fa83157
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion starknet-core/src/serde/num_hex.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pub mod u64 {
use alloc::{fmt::Formatter, format};
use core::mem;

use serde::{de::Visitor, Deserializer, Serializer};

Expand Down Expand Up @@ -43,7 +44,7 @@ pub mod u64 {
}

fn visit_bytes<E: serde::de::Error>(self, v: &[u8]) -> Result<Self::Value, E> {
<[u8; std::mem::size_of::<u64>()]>::try_from(v)
<[u8; mem::size_of::<u64>()]>::try_from(v)
.map(u64::from_be_bytes)
.map_err(serde::de::Error::custom)
}
Expand Down

0 comments on commit fa83157

Please sign in to comment.