File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1314,10 +1314,7 @@ impl RpcApi for Client {
1314
1314
) -> Result < T > {
1315
1315
let raw_args: Vec < _ > = args
1316
1316
. iter ( )
1317
- . map ( |a| {
1318
- let json_string = serde_json:: to_string ( a) ?;
1319
- serde_json:: value:: RawValue :: from_string ( json_string) // we can't use to_raw_value here due to compat with Rust 1.29
1320
- } )
1317
+ . map ( serde_json:: value:: to_raw_value)
1321
1318
. map ( |a| a. map_err ( |e| Error :: Json ( e) ) )
1322
1319
. collect :: < Result < Vec < _ > > > ( ) ?;
1323
1320
let req = self . client . build_request ( & cmd, & raw_args) ;
@@ -1345,11 +1342,7 @@ fn log_response(cmd: &str, resp: &Result<jsonrpc::Response>) {
1345
1342
debug ! ( target: "bitcoincore_rpc" , "JSON-RPC error for {}: {:?}" , cmd, e) ;
1346
1343
}
1347
1344
} else if log_enabled ! ( Trace ) {
1348
- // we can't use to_raw_value here due to compat with Rust 1.29
1349
- let def = serde_json:: value:: RawValue :: from_string (
1350
- serde_json:: Value :: Null . to_string ( ) ,
1351
- )
1352
- . unwrap ( ) ;
1345
+ let def = serde_json:: value:: to_raw_value ( & serde_json:: value:: Value :: Null ) . unwrap ( ) ;
1353
1346
let result = resp. result . as_ref ( ) . unwrap_or ( & def) ;
1354
1347
trace ! ( target: "bitcoincore_rpc" , "JSON-RPC response for {}: {}" , cmd, result) ;
1355
1348
}
You can’t perform that action at this time.
0 commit comments