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
+5 -16
View File
@@ -4,16 +4,9 @@
use super::runtime_types::RuntimeApi;
use crate::{
client::OnlineClientT,
error::Error,
Config,
};
use crate::{client::OnlineClientT, error::Error, Config};
use derivative::Derivative;
use std::{
future::Future,
marker::PhantomData,
};
use std::{future::Future, marker::PhantomData};
/// Execute runtime API calls.
#[derive(Derivative)]
@@ -51,13 +44,9 @@ where
// for the latest block and use that.
let block_hash = match block_hash {
Some(hash) => hash,
None => {
client
.rpc()
.block_hash(None)
.await?
.expect("substrate RPC returns the best block when no block number is provided; qed")
}
None => client.rpc().block_hash(None).await?.expect(
"substrate RPC returns the best block when no block number is provided; qed",
),
};
Ok(RuntimeApi::new(client, block_hash))