From 9425c0a8f17b13beb12568d38fcdb57f11f6cb05 Mon Sep 17 00:00:00 2001 From: Grigoriy Simonov Date: Fri, 22 Sep 2023 08:13:51 +0000 Subject: [PATCH] fix: warnings --- --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -425,7 +425,7 @@ .map(|cfg| &cfg.registry); let task_manager = sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry) - .map_err(|e| format!("Error: {:?}", e))?; + .map_err(|e| format!("Error: {e:?}"))?; let info_provider = Some(timestamp_with_aura_info(12000)); runner.async_run(|config| -> Result<(Pin>>, _)> { --- a/pallets/common/src/eth.rs +++ b/pallets/common/src/eth.rs @@ -119,7 +119,7 @@ } else if self.sub == Default::default() { Ok(Some(T::CrossAccountId::from_eth(self.eth))) } else { - Err(format!("All fields of cross account is non zeroed {:?}", self).into()) + Err(format!("All fields of cross account is non zeroed {self:?}").into()) } } --- a/pallets/scheduler-v2/src/benchmarking.rs +++ b/pallets/scheduler-v2/src/benchmarking.rs @@ -136,8 +136,10 @@ let bound = EncodedCall::bound() as u32; let mut len = match maybe_lookup_len { Some(len) => { - len.min(>::MaxSize::get() - 2) - .max(bound) - 3 + len.clamp( + bound, + >::MaxSize::get() - 2, + ) - 3 } None => bound.saturating_sub(4), }; --- a/runtime/common/tests/mod.rs +++ b/runtime/common/tests/mod.rs @@ -33,7 +33,7 @@ const PARA_ID: u32 = 2037; fn get_from_seed(seed: &str) -> ::Public { - TPublic::Pair::from_string(&format!("//{}", seed), None) + TPublic::Pair::from_string(&format!("//{seed}"), None) .expect("static values are valid; qed") .public() } --- a/tests/src/eth/nonFungible.test.ts +++ b/tests/src/eth/nonFungible.test.ts @@ -18,7 +18,7 @@ import {IKeyringPair} from '@polkadot/types/types'; import {Contract} from 'web3-eth-contract'; import {ITokenPropertyPermission} from '../util/playgrounds/types'; -import { CREATE_COLLECTION_DATA_DEFAULTS, CollectionMode, CreateCollectionData, TokenPermissionField } from './util/playgrounds/types'; +import {CREATE_COLLECTION_DATA_DEFAULTS, CollectionMode, CreateCollectionData, TokenPermissionField} from './util/playgrounds/types'; describe('Check ERC721 token URI for NFT', () => { let donor: IKeyringPair; --- a/tests/src/eth/reFungible.test.ts +++ b/tests/src/eth/reFungible.test.ts @@ -18,7 +18,7 @@ import {expect, itEth, usingEthPlaygrounds} from './util'; import {IKeyringPair} from '@polkadot/types/types'; import {ITokenPropertyPermission} from '../util/playgrounds/types'; -import { CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField } from './util/playgrounds/types'; +import {CREATE_COLLECTION_DATA_DEFAULTS, TokenPermissionField} from './util/playgrounds/types'; describe('Refungible: Plain calls', () => { let donor: IKeyringPair; -- gitstuff