From 085eb5e606f893e93882c90794e47199ebaf6f6d Mon Sep 17 00:00:00 2001 From: emostov <32168567+emostov@users.noreply.github.com> Date: Sun, 13 Dec 2020 20:34:08 -0800 Subject: [PATCH] Remove unused proc macro token stuff --- Cargo.toml | 2 -- src/extrinsic/mod.rs | 1 - src/lib.rs | 20 -------------------- 3 files changed, 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 907fcbed27..bbf4508748 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,6 @@ serde = { version = "1.0.115", features = ["derive"] } serde_json = "1.0.57" url = "2.1.1" codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive", "full"] } -quote = "1.0.7" -proc-macro2 = "1.0.19" frame-metadata = { version = "12", package = "frame-metadata" } frame-support = { version = "2.0.0", package = "frame-support" } diff --git a/src/extrinsic/mod.rs b/src/extrinsic/mod.rs index 2e13b89f8c..9ba7f85bb9 100644 --- a/src/extrinsic/mod.rs +++ b/src/extrinsic/mod.rs @@ -47,7 +47,6 @@ use crate::{ /// A reasonable default for `era_period` pub const DEFAULT_ERA_PERIOD: u64 = 64; - /// UncheckedExtrinsic type. pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic< ::Address, diff --git a/src/lib.rs b/src/lib.rs index 516ba6ad35..3a1ca2509a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -67,8 +67,6 @@ use sp_runtime::{ traits::{Block, Header}, SaturatedConversion }; -use quote::{TokenStreamExt, quote}; -use proc_macro2::TokenStream; mod error; mod events; @@ -213,23 +211,6 @@ pub struct SignedOptions { // pub era_period: Option, pub era_period: Option, } -// https://github.com/dtolnay/quote/issues/129#issue-481909264 -fn options_to_tokens(input: &core::option::Option) -> TokenStream { - match input { - Some(value) => quote!(core::option::Option::Some(#value)), - None => quote!(core::option::Option::None) - } -} -impl quote::ToTokens for self::SignedOptions { - fn to_tokens(&self, tokens: &mut TokenStream) { - let era_period = options_to_tokens(&self.era_period); - tokens.append_all(quote!( - SignedOptions { - era_period: #era_period - } - )); - } -} impl Clone for Client { fn clone(&self) -> Self { @@ -504,7 +485,6 @@ impl Client { } else { None }; - let signed = extrinsic::create_signed( &self.runtime_version, self.genesis_hash,