cosmwasm: wormhole: remove unecessary cast to usize

This commit is contained in:
Nikhil Suri 2022-12-15 10:16:21 -08:00 committed by Evan Gray
parent d094e3104a
commit ee2b6d0c17
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ impl ParsedVAA {
// Load 4 bytes starting from index 1
let guardian_set_index: u32 = data.get_u32(Self::GUARDIAN_SET_INDEX_POS);
let len_signers = data.get_u8(Self::LEN_SIGNER_POS) as usize;
let body_offset: usize = Self::HEADER_LEN + Self::SIGNATURE_LEN * len_signers as usize;
let body_offset: usize = Self::HEADER_LEN + Self::SIGNATURE_LEN * len_signers;
// Hash the body
if body_offset >= data.len() {

View File

@ -102,7 +102,7 @@ impl ParsedVAA {
// Load 4 bytes starting from index 1
let guardian_set_index: u32 = data.get_u32(Self::GUARDIAN_SET_INDEX_POS);
let len_signers = data.get_u8(Self::LEN_SIGNER_POS) as usize;
let body_offset: usize = Self::HEADER_LEN + Self::SIGNATURE_LEN * len_signers as usize;
let body_offset: usize = Self::HEADER_LEN + Self::SIGNATURE_LEN * len_signers;
// Hash the body
if body_offset >= data.len() {