Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vovac12 committed Apr 9, 2024
1 parent f8db2a5 commit 4db40ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions pallets/types/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ pub struct InboundCommitment<MaxPayload: Get<u32>> {

impl<MaxPayload: Get<u32>> InboundCommitment<MaxPayload> {
pub fn hash(&self) -> H256 {
("evm-inbound", self)
.using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(&encoded[..]))
("evm-inbound", self).using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(encoded))
}
}

Expand Down Expand Up @@ -303,7 +302,7 @@ pub struct StatusReport<MaxMessages: Get<u32>> {
impl<MaxMessages: Get<u32>> StatusReport<MaxMessages> {
pub fn hash(&self) -> H256 {
("evm-status-report", self)
.using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(&encoded[..]))
.using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(encoded))
}
}

Expand All @@ -325,7 +324,7 @@ pub struct BaseFeeUpdate {
impl BaseFeeUpdate {
pub fn hash(&self) -> H256 {
("base-fee-update", self)
.using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(&encoded[..]))
.using_encoded(|encoded| sp_runtime::traits::Keccak256::hash(encoded))
}
}

Expand Down
2 changes: 1 addition & 1 deletion pallets/types/src/substrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#![allow(clippy::large_enum_variant)]

use crate::{H160, H256};
use codec::{Decode, Encode};
use derivative::Derivative;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
use sp_core::{ecdsa, Get};
use crate::{H256, H160};
use sp_runtime::{traits::Hash, BoundedVec, RuntimeDebug};
use sp_std::prelude::*;

Expand Down

0 comments on commit 4db40ab

Please sign in to comment.