This repository was archived by the owner on Nov 25, 2025. It is now read-only.
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 {
13141314 ) -> Result < T > {
13151315 let raw_args: Vec < _ > = args
13161316 . 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)
13211318 . map ( |a| a. map_err ( |e| Error :: Json ( e) ) )
13221319 . collect :: < Result < Vec < _ > > > ( ) ?;
13231320 let req = self . client . build_request ( & cmd, & raw_args) ;
@@ -1345,11 +1342,7 @@ fn log_response(cmd: &str, resp: &Result<jsonrpc::Response>) {
13451342 debug ! ( target: "bitcoincore_rpc" , "JSON-RPC error for {}: {:?}" , cmd, e) ;
13461343 }
13471344 } 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 ( ) ;
13531346 let result = resp. result . as_ref ( ) . unwrap_or ( & def) ;
13541347 trace ! ( target: "bitcoincore_rpc" , "JSON-RPC response for {}: {}" , cmd, result) ;
13551348 }
You can’t perform that action at this time.
0 commit comments