Skip to content
Snippets Groups Projects
Commit 6b9bf55a authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

clippy

parent bf4ac99c
No related branches found
No related tags found
1 merge request!5add features and refac data
...@@ -6,7 +6,7 @@ use sp_core::sr25519::Signature; ...@@ -6,7 +6,7 @@ use sp_core::sr25519::Signature;
// use crate::runtime::runtime_types::pallet_identity::types::RevocationPayload; // use crate::runtime::runtime_types::pallet_identity::types::RevocationPayload;
type EncodedRevocationPayload = Vec<u8>; type EncodedRevocationPayload = Vec<u8>;
pub fn print_revoc_sig(data: &Data) -> () { pub fn print_revoc_sig(data: &Data) {
let (_, signature) = generate_revoc_doc(data); let (_, signature) = generate_revoc_doc(data);
println!("revocation payload signature"); println!("revocation payload signature");
println!("0x{}", hex::encode(signature)); println!("0x{}", hex::encode(signature));
......
use crate::*; use crate::*;
pub async fn runtime_info(data: Data) -> () { pub async fn runtime_info(data: Data) {
let api = data.client(); let api = data.client();
// certifications // certifications
......
...@@ -103,10 +103,12 @@ impl Data { ...@@ -103,10 +103,12 @@ impl Data {
/// build a client from url /// build a client from url
// TODO get client from a pre-defined list // TODO get client from a pre-defined list
pub async fn build_client(mut self) -> Self { pub async fn build_client(mut self) -> Self {
self.client = Some(Client::from_url(&self.args.url).await.expect(&format!( self.client = Some(Client::from_url(&self.args.url).await.unwrap_or_else(|_| {
"could not establish connection with the server {}", panic!(
self.args.url "could not establish connection with the server {}",
))); self.args.url
)
}));
self self
} }
/// build an indexer if not disabled /// build an indexer if not disabled
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment