Remove imports and cleanups (#3590)
* Remove unused import and if else chain
This commit is contained in:
committed by
GitHub
parent
45f74c396d
commit
725622da7a
@@ -20,10 +20,8 @@ use failure::{Fail, ResultExt};
|
||||
use hyper::body;
|
||||
use hyper::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, USER_AGENT};
|
||||
use hyper::{Body, Client, Request};
|
||||
use hyper_rustls;
|
||||
use hyper_timeout::TimeoutConnector;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use std::time::Duration;
|
||||
use tokio::runtime::Builder;
|
||||
|
||||
|
||||
@@ -856,7 +856,7 @@ macro_rules! doctest_helper_json_rpc_foreign_assert_response {
|
||||
// create temporary grin server, run jsonrpc request on node api, delete server, return
|
||||
// json response.
|
||||
|
||||
{
|
||||
{
|
||||
/*use grin_servers::test_framework::framework::run_doctest;
|
||||
use grin_util as util;
|
||||
use serde_json;
|
||||
@@ -890,6 +890,6 @@ macro_rules! doctest_helper_json_rpc_foreign_assert_response {
|
||||
serde_json::to_string_pretty(&expected_response).unwrap()
|
||||
);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+1
-2
@@ -16,7 +16,6 @@
|
||||
//! JSON RPC Client functionality
|
||||
use std::{error, fmt};
|
||||
|
||||
use hyper;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Builds a request
|
||||
@@ -143,7 +142,7 @@ impl fmt::Display for Error {
|
||||
write!(f, "duplicate RPC batch response ID: {}", v)
|
||||
}
|
||||
Error::_WrongBatchResponseId(ref v) => write!(f, "wrong RPC batch response ID: {}", v),
|
||||
_ => f.write_str(&self.to_string()),
|
||||
_ => write!(f, "{}", self),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ use grin_pool as pool;
|
||||
|
||||
use grin_util as util;
|
||||
|
||||
use failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
#[macro_use]
|
||||
|
||||
@@ -391,7 +391,7 @@ macro_rules! doctest_helper_json_rpc_owner_assert_response {
|
||||
// create temporary grin server, run jsonrpc request on node api, delete server, return
|
||||
// json response.
|
||||
|
||||
{
|
||||
{
|
||||
/*use grin_servers::test_framework::framework::run_doctest;
|
||||
use grin_util as util;
|
||||
use serde_json;
|
||||
@@ -425,6 +425,6 @@ macro_rules! doctest_helper_json_rpc_owner_assert_response {
|
||||
serde_json::to_string_pretty(&expected_response).unwrap()
|
||||
);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ use futures::TryStreamExt;
|
||||
use hyper::server::accept;
|
||||
use hyper::service::make_service_fn;
|
||||
use hyper::{Body, Request, Server, StatusCode};
|
||||
use rustls;
|
||||
use rustls::internal::pemfile;
|
||||
use std::convert::Infallible;
|
||||
use std::fmt::{self, Display};
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
use futures::future::{self, Future};
|
||||
use hyper;
|
||||
use hyper::service::Service;
|
||||
use hyper::{Body, Method, Request, Response, StatusCode};
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
|
||||
+2
-3
@@ -21,7 +21,6 @@ use crate::core::{core, ser};
|
||||
use crate::p2p;
|
||||
use crate::util::secp::pedersen;
|
||||
use crate::util::{self, ToHex};
|
||||
use serde;
|
||||
use serde::de::MapAccess;
|
||||
use serde::ser::SerializeStruct;
|
||||
use std::fmt;
|
||||
@@ -30,7 +29,7 @@ macro_rules! no_dup {
|
||||
($field:ident) => {
|
||||
if $field.is_some() {
|
||||
return Err(serde::de::Error::duplicate_field("$field"));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -644,7 +643,7 @@ impl BlockPrintable {
|
||||
.map(|output| {
|
||||
OutputPrintable::from_output(
|
||||
output,
|
||||
chain.clone(),
|
||||
chain,
|
||||
Some(&block.header),
|
||||
include_proof,
|
||||
include_merkle_proof,
|
||||
|
||||
@@ -5,7 +5,6 @@ use futures::future::ok;
|
||||
use hyper::body;
|
||||
use hyper::{Body, Request, Response, StatusCode};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt::Debug;
|
||||
use url::form_urlencoded;
|
||||
|
||||
Reference in New Issue
Block a user