mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Fix Clippy (#2522)
* Import Clippy config from Polkadot Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Auto clippy fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * No tabs in comments Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Prefer matches Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Dont drop references Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Trivial Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Refactor Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * add clippy to ci * Clippy reborrow Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update client/pov-recovery/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Partially revert 'Prefer matches' Using matches! instead of match does give less compiler checks as per review from @chevdor. Partially reverts 8c0609677f3ea040f77fffd5be6facf7c3fec95c Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update .cargo/config.toml Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Revert revert 💩 Should be fine to use matches! macro since it is an explicit whitelist, not wildcard matching. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
4dc50c8d89
commit
c312f0b9a6
@@ -39,7 +39,7 @@ pub struct GenesisExt {
|
||||
impl sp_runtime::BuildStorage for GenesisExt {
|
||||
fn assimilate_storage(&self, storage: &mut sp_core::storage::Storage) -> Result<(), String> {
|
||||
sp_state_machine::BasicExternalities::execute_with_storage(storage, || {
|
||||
sp_io::storage::set(cumulus_test_runtime::TEST_RUNTIME_UPGRADE_KEY, &vec![1, 2, 3, 4]);
|
||||
sp_io::storage::set(cumulus_test_runtime::TEST_RUNTIME_UPGRADE_KEY, &[1, 2, 3, 4]);
|
||||
cumulus_test_runtime::ParachainId::set(&self.para_id);
|
||||
});
|
||||
|
||||
@@ -125,7 +125,6 @@ fn testnet_genesis(
|
||||
code: cumulus_test_runtime::WASM_BINARY
|
||||
.expect("WASM binary was not build, please build it!")
|
||||
.to_vec(),
|
||||
..Default::default()
|
||||
},
|
||||
parachain_system: Default::default(),
|
||||
balances: cumulus_test_runtime::BalancesConfig {
|
||||
|
||||
@@ -630,7 +630,7 @@ impl TestNodeBuilder {
|
||||
let parachain_config = node_config(
|
||||
self.storage_update_func_parachain.unwrap_or_else(|| Box::new(|| ())),
|
||||
self.tokio_handle.clone(),
|
||||
self.key.clone(),
|
||||
self.key,
|
||||
self.parachain_nodes,
|
||||
self.parachain_nodes_exclusive,
|
||||
self.para_id,
|
||||
@@ -667,7 +667,7 @@ impl TestNodeBuilder {
|
||||
.await
|
||||
.expect("could not create Cumulus test service");
|
||||
|
||||
let peer_id = network.local_peer_id().clone();
|
||||
let peer_id = network.local_peer_id();
|
||||
let addr = MultiaddrWithPeerId { multiaddr, peer_id };
|
||||
|
||||
TestNode { task_manager, client, network, addr, rpc_handlers, transaction_pool }
|
||||
@@ -690,7 +690,7 @@ pub fn node_config(
|
||||
is_collator: bool,
|
||||
) -> Result<Configuration, ServiceError> {
|
||||
let base_path = BasePath::new_temp_dir()?;
|
||||
let root = base_path.path().join(format!("cumulus_test_service_{}", key.to_string()));
|
||||
let root = base_path.path().join(format!("cumulus_test_service_{}", key));
|
||||
let role = if is_collator { Role::Authority } else { Role::Full };
|
||||
let key_seed = key.to_seed();
|
||||
let mut spec = Box::new(chain_spec::get_chain_spec(para_id));
|
||||
@@ -786,7 +786,7 @@ impl TestNode {
|
||||
function: impl Into<runtime::RuntimeCall>,
|
||||
caller: Sr25519Keyring,
|
||||
) -> Result<RpcTransactionOutput, RpcTransactionError> {
|
||||
let extrinsic = construct_extrinsic(&*self.client, function, caller.pair(), Some(0));
|
||||
let extrinsic = construct_extrinsic(&self.client, function, caller.pair(), Some(0));
|
||||
|
||||
self.rpc_handlers.send_transaction(extrinsic.into()).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user