mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 14:25:41 +00:00
Fix updated clippy grumbles (#733)
* Revert "Pin Rust Nightly to 2020-12-17 (#652)" This reverts commit e54e6f7e3d34c28d698e637f9099162b3c1917e9. * fix clippy * clippy again * more clippy in test code * and new cargo fmt * another try
This commit is contained in:
committed by
Bastian Köcher
parent
85bb45b5d3
commit
90113303f1
@@ -394,6 +394,9 @@ where
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use super::*;
|
||||
use frame_support::{parameter_types, weights::Weight};
|
||||
use frame_system::{EventRecord, Phase};
|
||||
|
||||
@@ -210,6 +210,9 @@ fn prepare_deposit_details<T: Config<I>, I: Instance>(
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use super::*;
|
||||
use bp_currency_exchange::LockFundsTransaction;
|
||||
use frame_support::{assert_noop, assert_ok, construct_runtime, parameter_types, weights::Weight};
|
||||
|
||||
@@ -85,7 +85,7 @@ pub fn from_substrate_block_number(number: BlockNumber) -> Result<U256, Error> {
|
||||
|
||||
/// Parse Substrate header.
|
||||
pub fn parse_substrate_header(raw_header: &[u8]) -> Result<Header, Error> {
|
||||
let substrate_header = RuntimeHeader::decode(&mut &raw_header[..])
|
||||
let substrate_header = RuntimeHeader::decode(&mut &*raw_header)
|
||||
.map(|header| Header {
|
||||
hash: header.hash(),
|
||||
parent_hash: header.parent_hash,
|
||||
@@ -100,7 +100,7 @@ pub fn parse_substrate_header(raw_header: &[u8]) -> Result<Header, Error> {
|
||||
}
|
||||
})
|
||||
})
|
||||
.and_then(|log| ConsensusLog::decode(&mut &log[..]).ok())
|
||||
.and_then(|log| ConsensusLog::decode(&mut &*log).ok())
|
||||
.and_then(|log| match log {
|
||||
ConsensusLog::ScheduledChange(scheduled_change) => Some(ValidatorsSetSignal {
|
||||
delay: scheduled_change.delay,
|
||||
@@ -133,7 +133,7 @@ pub fn verify_substrate_finality_proof(
|
||||
raw_best_set: &[u8],
|
||||
raw_finality_proof: &[u8],
|
||||
) -> Result<(), Error> {
|
||||
let best_set = AuthorityList::decode(&mut &raw_best_set[..])
|
||||
let best_set = AuthorityList::decode(&mut &*raw_best_set)
|
||||
.map_err(Error::BestSetDecode)
|
||||
.and_then(|authorities| VoterSet::new(authorities.into_iter()).ok_or(Error::InvalidBestSet));
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
pub use crate::test_utils::{insert_header, validator_utils::*, validators_change_receipt, HeaderBuilder, GAS_LIMIT};
|
||||
pub use bp_eth_poa::signatures::secret_to_address;
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use crate::pallet::{BridgedHeader, Config};
|
||||
use bp_runtime::{BlockNumberOf, Chain};
|
||||
use frame_support::{construct_runtime, parameter_types, weights::Weight};
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use crate::Config;
|
||||
|
||||
use bp_message_lane::{
|
||||
|
||||
@@ -86,6 +86,9 @@ impl<T: Config> Module<T> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use super::*;
|
||||
use frame_support::sp_io::TestExternalities;
|
||||
use frame_support::sp_runtime::{
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
//! Includes some useful testing types and functions.
|
||||
|
||||
#![cfg(test)]
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
use crate::{BridgedBlockHash, BridgedBlockNumber, BridgedHeader, Config};
|
||||
use bp_runtime::Chain;
|
||||
|
||||
Reference in New Issue
Block a user