Skip to content

Commit

Permalink
fix: build process fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alenmestrov committed Nov 25, 2024
1 parent 56ee2b4 commit 52c530d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Method<Starknet> for MembersRevisionRequest {
fn encode(self) -> eyre::Result<Vec<u8>> {
// Split context_id into high/low parts
let bytes = self.context_id.as_bytes();
let mid_point = bytes.len().checked_div(2).expect("Length should be even");
let mid_point = bytes.len().checked_div(2).ok_or_else(|| eyre::eyre!("Length should be even"))?;
let (high_bytes, low_bytes) = bytes.split_at(mid_point);

// Convert to Felts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl Encode for EncodableString {
let bytes = self.0.as_bytes();

// Calculate full words and pending word
#[allow(clippy::integer_division)]
#[allow(clippy::integer_division, reason = "Not harmful here")]
let full_words_count = bytes.len() / WORD_SIZE;
let pending_len = bytes.len() % WORD_SIZE;

Expand Down

0 comments on commit 52c530d

Please sign in to comment.