[pbs-devel] [PATCH proxmox 2/3] pbs-api-types: fix values for integer schemas

Stefan Hanreich s.hanreich at proxmox.com
Wed Jan 29 11:42:49 CET 2025


Because of the change from isize to i64 some casts have to be adjusted
so the types for the maximum / default values are correct again.

Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
 pbs-api-types/src/datastore.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
index ddd8d3c6..36a3f093 100644
--- a/pbs-api-types/src/datastore.rs
+++ b/pbs-api-types/src/datastore.rs
@@ -92,14 +92,14 @@ pub const BACKUP_NAMESPACE_SCHEMA: Schema = StringSchema::new("Namespace.")
 pub const NS_MAX_DEPTH_SCHEMA: Schema =
     IntegerSchema::new("How many levels of namespaces should be operated on (0 == no recursion)")
         .minimum(0)
-        .maximum(MAX_NAMESPACE_DEPTH as isize)
-        .default(MAX_NAMESPACE_DEPTH as isize)
+        .maximum(MAX_NAMESPACE_DEPTH as i64)
+        .default(MAX_NAMESPACE_DEPTH as i64)
         .schema();
 
 pub const NS_MAX_DEPTH_REDUCED_SCHEMA: Schema =
 IntegerSchema::new("How many levels of namespaces should be operated on (0 == no recursion, empty == automatic full recursion, namespace depths reduce maximum allowed value)")
     .minimum(0)
-    .maximum(MAX_NAMESPACE_DEPTH as isize)
+    .maximum(MAX_NAMESPACE_DEPTH as i64)
     .schema();
 
 pub const DATASTORE_SCHEMA: Schema = StringSchema::new("Datastore name.")
-- 
2.39.5




More information about the pbs-devel mailing list