Remove unneeded Deserialize impls. (#1370)

This commit is contained in:
Tomasz Drwięga
2019-01-08 22:44:39 +01:00
committed by Gav Wood
parent 38cdd0a5c6
commit 8d4129aa22
9 changed files with 22 additions and 61 deletions
+6 -2
View File
@@ -26,6 +26,7 @@ use rpc::Result as RpcResult;
use rpc::futures::{stream, Future, Sink, Stream};
use runtime_primitives::generic::{BlockId, SignedBlock};
use runtime_primitives::traits::{Block as BlockT, Header, NumberFor};
use serde::Serialize;
use subscriptions::Subscriptions;
@@ -37,7 +38,10 @@ use self::error::Result;
build_rpc_trait! {
/// Substrate blockchain API
pub trait ChainApi<Hash, Header, Number, SignedBlock> {
pub trait ChainApi<Number, Hash> where
Header: Serialize,
SignedBlock: Serialize,
{
type Metadata;
/// Get header of a relay chain block.
@@ -148,7 +152,7 @@ impl<B, E, Block, RA> Chain<B, E, Block, RA> where
}
}
impl<B, E, Block, RA> ChainApi<Block::Hash, Block::Header, NumberFor<Block>, SignedBlock<Block>> for Chain<B, E, Block, RA> where
impl<B, E, Block, RA> ChainApi<NumberFor<Block>, Block::Hash, Block::Header, SignedBlock<Block>> for Chain<B, E, Block, RA> where
Block: BlockT<Hash=H256> + 'static,
B: client::backend::Backend<Block, Blake2Hasher> + Send + Sync + 'static,
E: client::CallExecutor<Block, Blake2Hasher> + Send + Sync + 'static,
+1
View File
@@ -22,6 +22,7 @@ extern crate jsonrpc_core as rpc;
extern crate jsonrpc_pubsub;
extern crate parity_codec as codec;
extern crate parking_lot;
extern crate serde;
extern crate serde_json;
extern crate sr_primitives as runtime_primitives;
extern crate sr_version as runtime_version;