cargo fmt with stable defaults (#876)

This commit is contained in:
James Wilson
2023-03-21 16:53:47 +00:00
committed by GitHub
parent c63ff6ec6d
commit 7c252fccf7
110 changed files with 663 additions and 1949 deletions
+6 -10
View File
@@ -2,17 +2,11 @@
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.
pub(crate) use crate::{
node_runtime,
TestNodeProcess,
};
pub(crate) use crate::{node_runtime, TestNodeProcess};
use sp_core::sr25519::Pair;
use sp_keyring::AccountKeyring;
use subxt::{
tx::PairSigner,
SubstrateConfig,
};
use subxt::{tx::PairSigner, SubstrateConfig};
/// substrate node should be installed on the $PATH
const SUBSTRATE_NODE_PATH: &str = "substrate";
@@ -20,8 +14,10 @@ const SUBSTRATE_NODE_PATH: &str = "substrate";
pub async fn test_context_with(key: AccountKeyring) -> TestContext {
let path = std::env::var("SUBSTRATE_NODE_PATH").unwrap_or_else(|_| {
if which::which(SUBSTRATE_NODE_PATH).is_err() {
panic!("A substrate binary should be installed on your path for integration tests. \
See https://github.com/paritytech/subxt/tree/master#integration-testing")
panic!(
"A substrate binary should be installed on your path for integration tests. \
See https://github.com/paritytech/subxt/tree/master#integration-testing"
)
}
SUBSTRATE_NODE_PATH.to_string()
});