Skip to content

Commit

Permalink
fix clippy and benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
lemunozm committed Aug 15, 2024
1 parent 6bbf27d commit 5825728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pallets/liquidity-pools-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pub mod pallet {
T::AdminOrigin::ensure_origin(origin)?;

ensure!(domain != Domain::Local, Error::<T>::DomainNotSupported);
DomainHookAddress::<T>::insert(domain.clone(), hook_address);
DomainHookAddress::<T>::insert(domain, hook_address);

Self::deposit_event(Event::DomainHookAddressSet {
domain,
Expand Down Expand Up @@ -379,7 +379,7 @@ pub mod pallet {
) -> DispatchResult {
ensure!(destination != Domain::Local, Error::<T>::DomainNotSupported);

PackedMessage::<T>::mutate((&from, destination.clone()), |batch| match batch {
PackedMessage::<T>::mutate((&from, destination), |batch| match batch {
Some(batch) => batch.pack_with(message),
None => Self::queue_message(destination, message),
})
Expand Down
7 changes: 1 addition & 6 deletions pallets/liquidity-pools-gateway/src/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ use cfg_types::domain_address::DomainAddress;
use frame_support::traits::EnsureOrigin;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
#[cfg(feature = "runtime-benchmarks")]
use sp_core::H160;
use sp_runtime::RuntimeDebug;

#[derive(Clone, Eq, PartialEq, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)]
Expand All @@ -34,9 +32,6 @@ impl<O: Into<Result<GatewayOrigin, O>> + From<GatewayOrigin>> EnsureOrigin<O> fo

#[cfg(feature = "runtime-benchmarks")]
fn try_successful_origin() -> Result<O, ()> {
Ok(O::from(GatewayOrigin::Domain(DomainAddress::EVM(
1,
H160::from_low_u64_be(1).into(),
))))
unimplemented!()
}
}

0 comments on commit 5825728

Please sign in to comment.