From 1699f40066acd55b886410b5ebca1427e48c0a9e Mon Sep 17 00:00:00 2001 From: Carlos Medeiros Date: Tue, 14 Jan 2025 08:37:00 +0000 Subject: [PATCH] small improvements --- app/rust/src/parser/chain_id.rs | 2 +- .../src/parser/transactions/pvm/banff/register_l1_validator.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rust/src/parser/chain_id.rs b/app/rust/src/parser/chain_id.rs index fdd75b3d..0edf2a87 100644 --- a/app/rust/src/parser/chain_id.rs +++ b/app/rust/src/parser/chain_id.rs @@ -49,7 +49,7 @@ impl<'b> FromBytes<'b> for ChainId<'b> { //good ptr and no uninit reads let out = out.as_mut_ptr(); unsafe { - addr_of_mut!((*out).0).write(&chain_id); + addr_of_mut!((*out).0).write(chain_id); } Ok(rem) diff --git a/app/rust/src/parser/transactions/pvm/banff/register_l1_validator.rs b/app/rust/src/parser/transactions/pvm/banff/register_l1_validator.rs index 86bf96dc..a0ee54ad 100644 --- a/app/rust/src/parser/transactions/pvm/banff/register_l1_validator.rs +++ b/app/rust/src/parser/transactions/pvm/banff/register_l1_validator.rs @@ -215,7 +215,7 @@ impl<'b> DisplayableItem for RegisterL1ValidatorTx<'b> { out[..prefix.len()].copy_from_slice(&prefix[..]); sz += hex_encode( - self.disable_owner.addresses[x as usize - 5 - n_remain_addresses as usize], + self.disable_owner.addresses[x as usize - 5 - n_remain_addresses], &mut out[prefix.len()..], ) .map_err(|_| ViewError::Unknown)?;