diff --git a/.rustfmt.toml b/.rustfmt.toml index 536703e6b3..3340762773 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -34,7 +34,7 @@ struct_field_align_threshold = 0 enum_discrim_align_threshold = 0 match_arm_blocks = true force_multiline_blocks = true # changed -fn_args_layout = "Tall" +fn_params_layout = "Tall" brace_style = "SameLineWhere" control_brace_style = "AlwaysSameLine" trailing_semicolon = false # changed diff --git a/cli/build.rs b/cli/build.rs index 0e4f3e2614..934108807c 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -23,12 +23,12 @@ fn output_git_short_hash() { Cow::from("unknown") } Err(err) => { - println!("cargo:warning=Failed to execute git command: {}", err); + println!("cargo:warning=Failed to execute git command: {err}"); Cow::from("unknown") } }; - println!("cargo:rustc-env=GIT_HASH={}", git_hash); + println!("cargo:rustc-env=GIT_HASH={git_hash}"); println!("cargo:rerun-if-changed=../.git/HEAD"); println!("cargo:rerun-if-changed=../.git/refs"); println!("cargo:rerun-if-changed=build.rs"); diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index 391a23eceb..127b370aab 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -107,6 +107,6 @@ fn codegen( type_substitutes, crate_path, ); - println!("{}", runtime_api); + println!("{runtime_api}"); Ok(()) } diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3071c5b2f5..d7ba6299e4 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -64,7 +64,7 @@ async fn handle_pallet_metadata(nodes: &[Uri], name: &str) -> color_eyre::Result Some(pallet_metadata) => { let hash = get_pallet_hash(&metadata.types, pallet_metadata); let hex_hash = hex::encode(hash); - println!("Node {:?} has pallet metadata hash {:?}", node, hex_hash); + println!("Node {node:?} has pallet metadata hash {hex_hash:?}"); compatibility .pallet_present @@ -93,7 +93,7 @@ async fn handle_full_metadata(nodes: &[Uri]) -> color_eyre::Result<()> { let metadata = fetch_runtime_metadata(node).await?; let hash = get_metadata_hash(&metadata); let hex_hash = hex::encode(hash); - println!("Node {:?} has metadata hash {:?}", node, hex_hash,); + println!("Node {node:?} has metadata hash {hex_hash:?}",); compatibility_map .entry(hex_hash) diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index b403e2edb9..4fe5ddc743 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -37,11 +37,11 @@ pub async fn run(opts: Opts) -> color_eyre::Result<()> { let bytes = hex::decode(hex_data.trim_start_matches("0x"))?; let metadata = ::decode(&mut &bytes[..])?; let json = serde_json::to_string_pretty(&metadata)?; - println!("{}", json); + println!("{json}"); Ok(()) } "hex" => { - println!("{}", hex_data); + println!("{hex_data}"); Ok(()) } "bytes" => { diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index b0a3314d8d..b3df7a3762 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -370,8 +370,8 @@ impl RuntimeGenerator { } /// Return a vector of tuples of variant names and corresponding struct definitions. -pub fn generate_structs_from_variants<'a, F>( - type_gen: &'a TypeGenerator, +pub fn generate_structs_from_variants( + type_gen: &TypeGenerator, type_id: u32, variant_to_struct_name: F, error_message_type_name: &str, diff --git a/codegen/src/types/mod.rs b/codegen/src/types/mod.rs index 5b652a852d..9829ce94d4 100644 --- a/codegen/src/types/mod.rs +++ b/codegen/src/types/mod.rs @@ -131,7 +131,7 @@ impl<'a> TypeGenerator<'a> { pub fn resolve_type(&self, id: u32) -> Type { self.type_registry .resolve(id) - .unwrap_or_else(|| panic!("No type with id {} found", id)) + .unwrap_or_else(|| panic!("No type with id {id} found")) .clone() } @@ -403,10 +403,7 @@ impl ToTokens for CratePath { impl From<&str> for CratePath { fn from(crate_path: &str) -> Self { Self(syn::Path::from_string(crate_path).unwrap_or_else(|err| { - panic!( - "failed converting {:?} to `syn::Path`: {:?}", - crate_path, err - ); + panic!("failed converting {crate_path:?} to `syn::Path`: {err:?}"); })) } } diff --git a/codegen/src/types/type_path.rs b/codegen/src/types/type_path.rs index 2391783243..9c3df5d748 100644 --- a/codegen/src/types/type_path.rs +++ b/codegen/src/types/type_path.rs @@ -127,7 +127,7 @@ impl TypePathType { "BTreeSet" => parse_quote!(::std::collections::BTreeSet), "Range" => parse_quote!(::core::ops::Range), "RangeInclusive" => parse_quote!(::core::ops::RangeInclusive), - ident => panic!("Unknown prelude type '{}'", ident), + ident => panic!("Unknown prelude type '{ident}'"), } } _ => { diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index 744ace1e90..b297c9776a 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -38,7 +38,7 @@ async fn main() -> Result<(), Box> { // Submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 98a1812dce..be53272d23 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -50,7 +50,7 @@ async fn main() -> Result<(), Box> { // submit the transaction: let hash = api.tx().sign_and_submit(&tx, &signer, tx_params).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index b3626faefa..0b4f80da3d 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -30,7 +30,6 @@ impl Config for MyConfig { // polkadot runtime used, so some operations will fail. Normally when using a custom `Config` // impl types MUST match exactly those used in the actual runtime. type Index = u64; - type BlockNumber = ::BlockNumber; type Hash = ::Hash; type Hasher = ::Hasher; type Header = ::Header; @@ -58,7 +57,7 @@ async fn main() -> Result<(), Box> { // submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index e0f652f588..5607f5a2ee 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -46,13 +46,13 @@ async fn main() -> Result<(), Box> { // submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); // 2. Dynamic constant access (the dynamic equivalent to the fetch_constants example). let constant_address = subxt::dynamic::constant("Balances", "ExistentialDeposit"); let existential_deposit = api.constants().at(&constant_address)?.to_value()?; - println!("Existential Deposit: {}", existential_deposit); + println!("Existential Deposit: {existential_deposit}"); // 3. Dynamic storage access diff --git a/examples/examples/fetch_constants.rs b/examples/examples/fetch_constants.rs index 369c924ecd..f8c2a11797 100644 --- a/examples/examples/fetch_constants.rs +++ b/examples/examples/fetch_constants.rs @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { // Look it up: let existential_deposit = api.constants().at(&address)?; - println!("Existential Deposit: {}", existential_deposit); + println!("Existential Deposit: {existential_deposit}"); Ok(()) } diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index 8da45696d6..ce678cfa46 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -45,14 +45,14 @@ async fn main() -> Result<(), Box> { ); let alice_id = AccountKeyring::Alice.to_account_id(); - println!(" Alice account id: {:?}", alice_id); + println!(" Alice account id: {alice_id:?}"); // Get Alice' Stash account ID let alice_stash_id: AccountId32 = sr25519::Pair::from_string("//Alice//stash", None) .expect("Could not obtain stash signer pair") .public() .into(); - println!(" Alice//stash account id: {:?}", alice_stash_id); + println!(" Alice//stash account id: {alice_stash_id:?}"); // Map from all locked "stash" accounts to the controller account. let controller_acc_addr = polkadot::storage().staking().bonded(&alice_stash_id); @@ -63,7 +63,7 @@ async fn main() -> Result<(), Box> { .fetch(&controller_acc_addr) .await? .unwrap(); - println!(" account controlled by: {:?}", controller_acc); + println!(" account controlled by: {controller_acc:?}"); let era_reward_addr = polkadot::storage().staking().eras_reward_points(era.index); let era_result = api @@ -72,7 +72,7 @@ async fn main() -> Result<(), Box> { .await? .fetch(&era_reward_addr) .await?; - println!("Era reward points: {:?}", era_result); + println!("Era reward points: {era_result:?}"); Ok(()) } diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index 16fd6b185a..718373e321 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -40,7 +40,7 @@ async fn main() -> Result<(), Box> { println!("\nExample 1. Obtained keys:"); while let Some((key, value)) = iter.next().await? { println!("Key: 0x{}", hex::encode(key)); - println!(" Value: {}", value); + println!(" Value: {value}"); } } @@ -69,7 +69,7 @@ async fn main() -> Result<(), Box> { // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format let value = u64::decode(&mut &*storage_data)?; - println!(" Value: {}", value); + println!(" Value: {value}"); } } } @@ -109,7 +109,7 @@ async fn main() -> Result<(), Box> { // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format let value = u64::decode(&mut &storage_data[..])?; - println!(" Value: {}", value); + println!(" Value: {value}"); } } } diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index fba15707e7..6776146069 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -169,7 +169,7 @@ async fn handle_transfer_events() -> Result<(), Box> { } // Report other statuses we see. else { - println!("Current transaction status: {:?}", ev); + println!("Current transaction status: {ev:?}"); } } diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index 27a9830d8c..641f444944 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), Box> { let update_client = api.updater(); tokio::spawn(async move { let result = update_client.perform_runtime_updates().await; - println!("Runtime update failed with result={:?}", result); + println!("Runtime update failed with result={result:?}"); }); // If this client is kept in use a while, it'll update its metadata and such diff --git a/subxt/src/blocks/block_types.rs b/subxt/src/blocks/block_types.rs index e58afc21f9..0105f428c7 100644 --- a/subxt/src/blocks/block_types.rs +++ b/subxt/src/blocks/block_types.rs @@ -57,7 +57,7 @@ where } /// Return the block number. - pub fn number(&self) -> T::BlockNumber { + pub fn number(&self) -> ::Number { self.header().number() } diff --git a/subxt/src/config/mod.rs b/subxt/src/config/mod.rs index b7a2fbada6..ce75b4664e 100644 --- a/subxt/src/config/mod.rs +++ b/subxt/src/config/mod.rs @@ -13,12 +13,14 @@ pub mod polkadot; pub mod substrate; use codec::{ - Codec, + Decode, Encode, - EncodeLike, }; use core::fmt::Debug; -use serde::Serialize; +use serde::{ + de::DeserializeOwned, + Serialize, +}; pub use extrinsic_params::ExtrinsicParams; pub use polkadot::PolkadotConfig; @@ -31,66 +33,39 @@ pub use substrate::SubstrateConfig; pub trait Config: 'static { /// Account index (aka nonce) type. This stores the number of previous /// transactions associated with a sender account. - type Index: Parameter - + Member - + serde::de::DeserializeOwned - + Default - + Copy - + scale_info::TypeInfo - + Into; - - /// The block number type used by the runtime. - type BlockNumber: Parameter - + Member - + Default - + Copy - + std::hash::Hash - + std::str::FromStr - + Into; + type Index: Debug + Copy + DeserializeOwned + Into; /// The output of the `Hashing` function. - type Hash: Parameter - + Member - + serde::Serialize - + serde::de::DeserializeOwned - + Ord - + Default + type Hash: Debug + Copy - + std::hash::Hash + + Send + + Sync + + Decode + AsRef<[u8]> - + AsMut<[u8]> - + scale_info::TypeInfo; + + Serialize + + DeserializeOwned + + Encode + + PartialEq; /// The account ID type. - type AccountId: Clone + Serialize; + type AccountId: Debug + Clone + Serialize; /// The address type. - type Address: Encode + From; + type Address: Debug + Encode + From; /// The signature type. - type Signature: Encode; + type Signature: Debug + Encode; /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). - type Hasher: Hasher; + type Hasher: Debug + Hasher; /// The block header. - type Header: Parameter - + Header - + Member - + serde::de::DeserializeOwned; + type Header: Debug + Header + Send + DeserializeOwned; /// This type defines the extrinsic extra and additional parameters. type ExtrinsicParams: extrinsic_params::ExtrinsicParams; } -/// Parameter trait copied from `substrate::frame_support`. -pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug {} -impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug {} - -/// A type that can be used in runtime structures. Copied from `sp_runtime::traits`. -pub trait Member: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static {} -impl Member for T {} - /// This represents the hasher used by a node to hash things like block headers /// and extrinsics. pub trait Hasher { @@ -110,7 +85,7 @@ pub trait Hasher { /// This represents the block header type used by a node. pub trait Header: Sized + Encode { /// The block number type for this header. - type Number; + type Number: Into; /// The hasher used to hash this header. type Hasher: Hasher; @@ -146,7 +121,6 @@ impl> Config for WithExtrinsicParams { type Index = T::Index; - type BlockNumber = T::BlockNumber; type Hash = T::Hash; type AccountId = T::AccountId; type Address = T::Address; diff --git a/subxt/src/config/substrate.rs b/subxt/src/config/substrate.rs index e9c559addd..b51046b56d 100644 --- a/subxt/src/config/substrate.rs +++ b/subxt/src/config/substrate.rs @@ -39,13 +39,12 @@ pub enum SubstrateConfig {} impl Config for SubstrateConfig { type Index = u32; - type BlockNumber = u32; type Hash = H256; type AccountId = AccountId32; type Address = MultiAddress; type Signature = MultiSignature; type Hasher = BlakeTwo256; - type Header = SubstrateHeader; + type Header = SubstrateHeader; type ExtrinsicParams = SubstrateExtrinsicParams; } @@ -124,10 +123,9 @@ pub struct SubstrateHeader + TryFrom, H: Hasher> { pub digest: Digest, } -impl + TryFrom + Encode, H: Hasher + Encode> Header - for SubstrateHeader +impl Header for SubstrateHeader where - N: Copy + Into + TryFrom + Encode, + N: Copy + Into + Into + TryFrom + Encode, H: Hasher + Encode, SubstrateHeader: Encode, { @@ -268,14 +266,11 @@ impl<'a> serde::Deserialize<'a> for DigestItem { { let r = impl_serde::serialize::deserialize(de)?; Decode::decode(&mut &r[..]) - .map_err(|e| serde::de::Error::custom(format!("Decode error: {}", e))) + .map_err(|e| serde::de::Error::custom(format!("Decode error: {e}"))) } } -fn serialize_number + TryFrom>( - val: &T, - s: S, -) -> Result +fn serialize_number>(val: &T, s: S) -> Result where S: serde::Serializer, { @@ -283,9 +278,7 @@ where serde::Serialize::serialize(&u256, s) } -fn deserialize_number<'a, D, T: Copy + Into + TryFrom>( - d: D, -) -> Result +fn deserialize_number<'a, D, T: TryFrom>(d: D) -> Result where D: serde::Deserializer<'a>, { diff --git a/subxt/src/rpc/types.rs b/subxt/src/rpc/types.rs index 9772363671..a1a333f29b 100644 --- a/subxt/src/rpc/types.rs +++ b/subxt/src/rpc/types.rs @@ -124,7 +124,7 @@ impl<'a> ::serde::Deserialize<'a> for ChainBlockExtrinsic { { let r = impl_serde::serialize::deserialize(de)?; let bytes = Decode::decode(&mut &r[..]) - .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {}", e)))?; + .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {e}")))?; Ok(ChainBlockExtrinsic(bytes)) } } @@ -778,7 +778,7 @@ mod as_string { ) -> Result { String::deserialize(deserializer)? .parse() - .map_err(|e| serde::de::Error::custom(format!("Parsing failed: {}", e))) + .map_err(|e| serde::de::Error::custom(format!("Parsing failed: {e}"))) } } diff --git a/subxt/src/utils/account_id.rs b/subxt/src/utils/account_id.rs index 2c8ae354c1..537460a8b5 100644 --- a/subxt/src/utils/account_id.rs +++ b/subxt/src/utils/account_id.rs @@ -136,7 +136,7 @@ impl<'de> Deserialize<'de> for AccountId32 { D: serde::Deserializer<'de>, { AccountId32::from_ss58check(&String::deserialize(deserializer)?) - .map_err(|e| serde::de::Error::custom(format!("{:?}", e))) + .map_err(|e| serde::de::Error::custom(format!("{e:?}"))) } } diff --git a/testing/integration-tests/src/codegen/codegen_documentation.rs b/testing/integration-tests/src/codegen/codegen_documentation.rs index 236e53c8b3..9299ecef50 100644 --- a/testing/integration-tests/src/codegen/codegen_documentation.rs +++ b/testing/integration-tests/src/codegen/codegen_documentation.rs @@ -106,8 +106,7 @@ fn check_documentation() { for raw in raw_docs.iter() { assert!( runtime_docs.contains(raw), - "Documentation not present in runtime API: {}", - raw + "Documentation not present in runtime API: {raw}" ); } } diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 0340c3882f..97403c3456 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -194,8 +194,7 @@ async fn tx_instantiate_with_code() { assert!( result.is_ok(), - "Error calling instantiate_with_code and receiving CodeStored and Instantiated Events: {:?}", - result + "Error calling instantiate_with_code and receiving CodeStored and Instantiated Events: {result:?}" ); } @@ -208,8 +207,7 @@ async fn tx_instantiate() { assert!( instantiated.is_ok(), - "Error instantiating contract: {:?}", - instantiated + "Error instantiating contract: {instantiated:?}" ); } @@ -244,9 +242,9 @@ async fn tx_call() { .iter() .map(|key| hex::encode(&key.0)) .collect::>(); - println!("keys post: {:?}", keys); + println!("keys post: {keys:?}"); let executed = cxt.call(contract, vec![]).await; - assert!(executed.is_ok(), "Error calling contract: {:?}", executed); + assert!(executed.is_ok(), "Error calling contract: {executed:?}"); } diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index be6adc20c2..7345ab25f9 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -27,7 +27,7 @@ use subxt::error::{ /// Helper function to generate a crypto pair from seed fn get_from_seed(seed: &str) -> sr25519::Pair { - sr25519::Pair::from_string(&format!("//{}", seed), None) + sr25519::Pair::from_string(&format!("//{seed}"), None) .expect("static values are valid; qed") } diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index 1f18fe0434..4133f2faef 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -103,7 +103,7 @@ impl TestNodeProcessBuilder { .arg("--ws-port=0"); if let Some(authority) = self.authority { - let authority = format!("{:?}", authority); + let authority = format!("{authority:?}"); let arg = format!("--{}", authority.as_str().to_lowercase()); cmd.arg(arg); } @@ -119,14 +119,14 @@ impl TestNodeProcessBuilder { // Wait for RPC port to be logged (it's logged to stderr): let stderr = proc.stderr.take().unwrap(); let ws_port = find_substrate_port_from_output(stderr); - let ws_url = format!("ws://127.0.0.1:{}", ws_port); + let ws_url = format!("ws://127.0.0.1:{ws_port}"); // Connect to the node with a subxt client: let client = OnlineClient::from_url(ws_url.clone()).await; match client { Ok(client) => Ok(TestNodeProcess { proc, client }), Err(err) => { - let err = format!("Failed to connect to node rpc at {}: {}", ws_url, err); + let err = format!("Failed to connect to node rpc at {ws_url}: {err}"); tracing::error!("{}", err); proc.kill().map_err(|e| { format!("Error killing substrate process '{}': {}", proc.id(), e) diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 1d7738afd7..5084936e93 100644 --- a/testing/test-runtime/build.rs +++ b/testing/test-runtime/build.rs @@ -33,7 +33,7 @@ async fn run() { let cmd = Command::new(&substrate_bin) .arg("--dev") .arg("--tmp") - .arg(format!("--ws-port={}", port)) + .arg(format!("--ws-port={port}")) .spawn(); let mut cmd = match cmd { Ok(cmd) => KillOnDrop(cmd), @@ -42,7 +42,7 @@ async fn run() { See https://github.com/paritytech/subxt/tree/master#integration-testing") } Err(e) => { - panic!("Cannot spawn substrate command '{}': {}", substrate_bin, e) + panic!("Cannot spawn substrate command '{substrate_bin}': {e}") } }; @@ -53,13 +53,13 @@ async fn run() { loop { if retries >= MAX_RETRIES { - panic!("Cannot connect to substrate node after {} retries", retries); + panic!("Cannot connect to substrate node after {retries} retries"); } // It might take a while for substrate node that spin up the RPC server. // Thus, the connection might get rejected a few times. use client::ClientT; - let res = match client::build(&format!("ws://localhost:{}", port)).await { + let res = match client::build(&format!("ws://localhost:{port}")).await { Ok(c) => c.request("state_getMetadata", client::rpc_params![]).await, Err(e) => Err(e), }; @@ -114,7 +114,7 @@ async fn run() { substrate_path.to_string_lossy() ); // Re-build if we point to a different substrate binary: - println!("cargo:rerun-if-env-changed={}", SUBSTRATE_BIN_ENV_VAR); + println!("cargo:rerun-if-env-changed={SUBSTRATE_BIN_ENV_VAR}"); // Re-build if this file changes: println!("cargo:rerun-if-changed=build.rs"); }