Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Companion of paritytech/substrate#10183, !
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Aug 4, 2022
1 parent 4a72851 commit b4d6b35
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frame/dvm/evm/precompiles/utils/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use alloc::borrow::ToOwned;
use core::{any::type_name, ops::Range};
use impl_trait_for_tuples::impl_for_tuples;
use sp_core::{H160, H256, U256};
use sp_std::{convert::TryInto, vec, vec::Vec};
use sp_std::prelude::*;

/// The `address` type of Solidity.
/// H160 could represent 2 types of data (bytes20 and address) that are not encoded the same way.
Expand Down
1 change: 0 additions & 1 deletion frame/staking/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,6 @@ impl<T: Config> ElectionDataProvider<AccountId<T>, BlockNumberFor<T>> for Pallet
targets: Vec<AccountId<T>>,
target_stake: Option<VoteWeight>,
) {
use sp_std::convert::TryFrom;
targets.into_iter().for_each(|v| {
let stake: BalanceOf<T> = target_stake
.and_then(|w| <BalanceOf<T>>::try_from(w).ok())
Expand Down
1 change: 0 additions & 1 deletion frame/staking/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ impl<T: Config> VoteWeightProvider<T::AccountId> for Pallet<T> {
fn set_vote_weight_of(who: &T::AccountId, weight: VoteWeight) {
// this will clearly results in an inconsistent state, but it should not matter for a
// benchmark.
use sp_std::convert::TryInto;
let active: BalanceOf<T> = weight.try_into().map_err(|_| ()).unwrap();
let mut ledger = Self::ledger(who).unwrap_or_default();
ledger.active = active;
Expand Down
2 changes: 1 addition & 1 deletion frame/wormhole/backing/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub mod pallet {
use sp_runtime::traits::{AccountIdConversion, SaturatedConversion, Saturating, Zero};
#[cfg(not(feature = "std"))]
use sp_std::borrow::ToOwned;
use sp_std::{convert::TryFrom, prelude::*};
use sp_std::prelude::*;
// --- darwinia-network ---
use crate::weights::WeightInfo;
use darwinia_relay_authority::{EcdsaSigner, RelayAuthorityProtocol, Term};
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/pangolin/src/bridges_message/pangoro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use frame_support::{
RuntimeDebug,
};
use sp_runtime::{traits::Zero, FixedPointNumber, FixedU128};
use sp_std::{convert::TryFrom, ops::RangeInclusive};
use sp_std::{ops::RangeInclusive, prelude::*};
// --- darwinia-network ---
use crate::*;
use bp_message_dispatch::CallOrigin;
Expand Down
2 changes: 1 addition & 1 deletion node/runtime/pangoro/src/bridges_message/pangolin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use frame_support::{
RuntimeDebug,
};
use sp_runtime::{traits::Zero, FixedPointNumber, FixedU128};
use sp_std::{convert::TryFrom, ops::RangeInclusive};
use sp_std::{ops::RangeInclusive, prelude::*};
// --- darwinia-network ---
use crate::*;
use bp_message_dispatch::CallOrigin;
Expand Down
2 changes: 1 addition & 1 deletion primitives/contract/src/abi_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! the primitive types of contract encode and decode.

use ethabi::{param_type::ParamType, token::Token, Error, Result as AbiResult};
use sp_std::{convert::TryInto, prelude::*};
use sp_std::prelude::*;

pub fn abi_decode_bytes4(data: &[u8]) -> AbiResult<[u8; 4]> {
let tokens = ethabi::decode(&[ParamType::FixedBytes(4)], &data)?;
Expand Down
2 changes: 1 addition & 1 deletion primitives/contract/src/mapping_token_factory/s2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use ethabi::{
};
// --- paritytech ---
use bp_messages::{LaneId, MessageNonce};
use sp_std::{convert::TryInto, prelude::*};
use sp_std::prelude::*;

pub struct Sub2SubMappingTokenFactory;

Expand Down

0 comments on commit b4d6b35

Please sign in to comment.