declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel
2022-08-15 20:38:36 +01:00
committed by GitHub
parent 9c2a2495fe
commit a68a80fbae
72 changed files with 344 additions and 512 deletions
@@ -170,7 +170,7 @@ pub(crate) struct RuntimeApi {
impl ProvideRuntimeApi<Block> for TestApi {
type Api = RuntimeApi;
fn runtime_api<'a>(&'a self) -> ApiRef<'a, Self::Api> {
fn runtime_api(&self) -> ApiRef<'_, Self::Api> {
RuntimeApi { inner: self.clone() }.into()
}
}
@@ -210,7 +210,7 @@ impl GenesisAuthoritySetProvider<Block> for TestApi {
const TEST_GOSSIP_DURATION: Duration = Duration::from_millis(500);
fn make_ids(keys: &[Ed25519Keyring]) -> AuthorityList {
keys.iter().map(|key| key.clone().public().into()).map(|id| (id, 1)).collect()
keys.iter().map(|&key| key.public().into()).map(|id| (id, 1)).collect()
}
fn create_keystore(authority: Ed25519Keyring) -> (SyncCryptoStorePtr, tempfile::TempDir) {
@@ -533,7 +533,7 @@ fn transition_3_voters_twice_1_full_observer() {
{
let net = net.clone();
let client = net.lock().peers[0].client().clone();
let peers_c = peers_c.clone();
let peers_c = *peers_c;
// wait for blocks to be finalized before generating new ones
let block_production = client