Clippy work towards rust 1.38 (#6219)

This commit is contained in:
Michael Vines
2019-10-02 18:04:18 -07:00
committed by GitHub
parent c06876eb3d
commit 13fc518268
12 changed files with 75 additions and 78 deletions

View File

@@ -53,10 +53,11 @@ impl GenericRpcClientRequest for RpcClientRequest {
Ok(mut response) => {
let json: serde_json::Value = serde_json::from_str(&response.text()?)?;
if json["error"].is_object() {
Err(RpcError::RpcRequestError(format!(
return Err(RpcError::RpcRequestError(format!(
"RPC Error response: {}",
serde_json::to_string(&json["error"]).unwrap()
)))?
))
.into());
}
return Ok(json["result"].clone());
}
@@ -66,7 +67,7 @@ impl GenericRpcClientRequest for RpcClientRequest {
request, retries, e
);
if retries == 0 {
Err(e)?;
return Err(e.into());
}
retries -= 1;