From 7b881ef34194ddc93d2a07f4cb10942bb99f935e Mon Sep 17 00:00:00 2001 From: Shaopeng Wang <spxwang@gmail.com> Date: Fri, 29 May 2020 13:52:10 +1200 Subject: [PATCH] fmt (#192) --- oracle/rpc/runtime-api/src/lib.rs | 1 - oracle/rpc/src/lib.rs | 22 ++++++++++------------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/oracle/rpc/runtime-api/src/lib.rs b/oracle/rpc/runtime-api/src/lib.rs index 90665de..f39bb7f 100644 --- a/oracle/rpc/runtime-api/src/lib.rs +++ b/oracle/rpc/runtime-api/src/lib.rs @@ -1,7 +1,6 @@ //! Runtime API definition for oracle module. #![cfg_attr(not(feature = "std"), no_std)] - // The `too_many_arguments` warning originates from `decl_runtime_apis` macro. #![allow(clippy::too_many_arguments)] diff --git a/oracle/rpc/src/lib.rs b/oracle/rpc/src/lib.rs index 1a01602..130093e 100644 --- a/oracle/rpc/src/lib.rs +++ b/oracle/rpc/src/lib.rs @@ -59,12 +59,11 @@ where let at = BlockId::hash(at.unwrap_or_else(|| // If the block hash is not supplied assume the best block. self.client.info().best_hash)); - api.get_value(&at, key) - .map_err(|e| RpcError { - code: ErrorCode::ServerError(Error::RuntimeError.into()), - message: "Unable to get value.".into(), - data: Some(format!("{:?}", e).into()), - }) + api.get_value(&at, key).map_err(|e| RpcError { + code: ErrorCode::ServerError(Error::RuntimeError.into()), + message: "Unable to get value.".into(), + data: Some(format!("{:?}", e).into()), + }) } fn get_all_values(&self, at: Option<<Block as BlockT>::Hash>) -> Result<Vec<(Key, Option<Value>)>> { @@ -72,11 +71,10 @@ where let at = BlockId::hash(at.unwrap_or_else(|| // If the block hash is not supplied assume the best block. self.client.info().best_hash)); - api.get_all_values(&at) - .map_err(|e| RpcError { - code: ErrorCode::ServerError(Error::RuntimeError.into()), - message: "Unable to get all values.".into(), - data: Some(format!("{:?}", e).into()), - }) + api.get_all_values(&at).map_err(|e| RpcError { + code: ErrorCode::ServerError(Error::RuntimeError.into()), + message: "Unable to get all values.".into(), + data: Some(format!("{:?}", e).into()), + }) } } -- GitLab