From 8049ea6cfdab0aa6c8f5a793585e40828264379c Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 16 Dec 2023 17:47:37 +0200 Subject: [PATCH] Use 'serde_json::value::to_raw_value' in Client::call() --- client/src/client.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/client.rs b/client/src/client.rs index faea7490..3d9e95d1 100644 --- a/client/src/client.rs +++ b/client/src/client.rs @@ -1309,10 +1309,7 @@ impl RpcApi for Client { ) -> Result { let raw_args: Vec<_> = args .iter() - .map(|a| { - let json_string = serde_json::to_string(a)?; - serde_json::value::RawValue::from_string(json_string) // we can't use to_raw_value here due to compat with Rust 1.29 - }) + .map(serde_json::value::to_raw_value) .map(|a| a.map_err(|e| Error::Json(e))) .collect::>>()?; let req = self.client.build_request(&cmd, &raw_args);