From 9b5ecbe2ffb113fabb913b6860707d7df9c19507 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 28 Oct 2021 11:47:54 +0200 Subject: [PATCH] backup-client: use () instead of Value as return type shorter and we do a conversion anyway Signed-off-by: Dominik Csapak Signed-off-by: Wolfgang Bumiller --- proxmox-backup-client/src/snapshot.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxmox-backup-client/src/snapshot.rs b/proxmox-backup-client/src/snapshot.rs index 46b1db09..a9976fbe 100644 --- a/proxmox-backup-client/src/snapshot.rs +++ b/proxmox-backup-client/src/snapshot.rs @@ -377,7 +377,7 @@ async fn update_notes(param: Value) -> Result { } )] /// Show protection status of the specified snapshot -async fn show_protection(param: Value) -> Result { +async fn show_protection(param: Value) -> Result<(), Error> { let repo = extract_repository_from_value(¶m)?; let path = required_string_param(¶m, "snapshot")?; @@ -411,7 +411,7 @@ async fn show_protection(param: Value) -> Result { ); } - Ok(Value::Null) + Ok(()) } #[api( @@ -433,7 +433,7 @@ async fn show_protection(param: Value) -> Result { } )] /// Update Protection Status of a snapshot -async fn update_protection(protected: bool, param: Value) -> Result { +async fn update_protection(protected: bool, param: Value) -> Result<(), Error> { let repo = extract_repository_from_value(¶m)?; let path = required_string_param(¶m, "snapshot")?; @@ -451,7 +451,7 @@ async fn update_protection(protected: bool, param: Value) -> Result CliCommandMap {