[pbs-devel] [PATCH proxmox 3/3] client: move to proxmox_serde perl helpers

Stefan Hanreich s.hanreich at proxmox.com
Tue May 13 12:14:56 CEST 2025


The perl helpers have been moved to proxmox_serde from proxmox_login,
so fix all occurences using the proxmox_login crate.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 proxmox-client/Cargo.toml | 2 ++
 proxmox-client/src/lib.rs | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/proxmox-client/Cargo.toml b/proxmox-client/Cargo.toml
index c2682e77..b15c9faa 100644
--- a/proxmox-client/Cargo.toml
+++ b/proxmox-client/Cargo.toml
@@ -27,6 +27,8 @@ proxmox-login = { workspace = true, features = [ "http" ] }
 proxmox-http = { workspace = true, optional = true, features = [ "client" ] }
 hyper = { workspace = true, optional = true }
 
+proxmox-serde = { workspace = true, features = [ "perl" ] }
+
 [dev-dependencies]
 serde_plain.workspace = true
 
diff --git a/proxmox-client/src/lib.rs b/proxmox-client/src/lib.rs
index e802f4ce..f1df1e1d 100644
--- a/proxmox-client/src/lib.rs
+++ b/proxmox-client/src/lib.rs
@@ -173,10 +173,10 @@ pub struct ApiResponseData<T> {
 
 #[derive(serde::Deserialize)]
 struct RawApiResponse<T> {
-    #[serde(default, deserialize_with = "proxmox_login::parse::deserialize_u16")]
+    #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_u16")]
     status: Option<u16>,
     message: Option<String>,
-    #[serde(default, deserialize_with = "proxmox_login::parse::deserialize_bool")]
+    #[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_bool")]
     success: Option<bool>,
     data: Option<T>,
 
-- 
2.39.5




More information about the pbs-devel mailing list