Skip to content

Commit ee20339

Browse files
committed
Upgrade jsonrpc dependency to v0.18.0
Upgrade to the latest released `jsonrpc` version.
1 parent 3a3446a commit ee20339

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

client/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ path = "src/lib.rs"
2222
bitcoincore-rpc-json = { version = "0.18.0", path = "../json" }
2323

2424
log = "0.4.5"
25-
jsonrpc = "0.14.0"
25+
jsonrpc = { version = "0.18.0", features = [] }
2626

2727
# Used for deserialization of JSON.
2828
serde = "1"

client/src/client.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,8 @@ impl RpcApi for Client {
13131313
cmd: &str,
13141314
args: &[serde_json::Value],
13151315
) -> Result<T> {
1316-
let raw_args: Vec<_> = args
1317-
.iter()
1318-
.map(serde_json::value::to_raw_value)
1319-
.map(|a| a.map_err(|e| Error::Json(e)))
1320-
.collect::<Result<Vec<_>>>()?;
1321-
let req = self.client.build_request(&cmd, &raw_args);
1316+
let raw = serde_json::value::to_raw_value(args)?;
1317+
let req = self.client.build_request(&cmd, Some(&*raw));
13221318
if log_enabled!(Debug) {
13231319
debug!(target: "bitcoincore_rpc", "JSON-RPC request: {} {}", cmd, serde_json::Value::from(args));
13241320
}

0 commit comments

Comments
 (0)