Skip to content
Open
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
4 changes: 2 additions & 2 deletions crates/rust-client/src/rpc/domain/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl ToHex for &proto::primitives::Digest {

impl ToHex for proto::primitives::Digest {
fn encode_hex<T: FromIterator<char>>(&self) -> T {
let mut data: Vec<char> = Vec::with_capacity(Word::SERIALIZED_SIZE);
let mut data: Vec<char> = Vec::with_capacity(Word::SERIALIZED_SIZE * 2);
data.extend(format!("{:016x}", self.d0).chars());
data.extend(format!("{:016x}", self.d1).chars());
data.extend(format!("{:016x}", self.d2).chars());
Expand All @@ -45,7 +45,7 @@ impl ToHex for proto::primitives::Digest {
}

fn encode_hex_upper<T: FromIterator<char>>(&self) -> T {
let mut data: Vec<char> = Vec::with_capacity(Word::SERIALIZED_SIZE);
let mut data: Vec<char> = Vec::with_capacity(Word::SERIALIZED_SIZE * 2);
data.extend(format!("{:016X}", self.d0).chars());
data.extend(format!("{:016X}", self.d1).chars());
data.extend(format!("{:016X}", self.d2).chars());
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-client/src/rpc/domain/word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::rpc::{errors::RpcConversionError, generated::word};
// CONSTANTS
// ================================================================================================

pub const WORD_DATA_SIZE: usize = 32;
pub const WORD_DATA_SIZE: usize = Word::SERIALIZED_SIZE * 2;

// FORMATTING
// ================================================================================================
Expand Down
Loading