]> git.proxmox.com Git - proxmox-backup.git/commitdiff
client: forget snapshots: function signature returns no value
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Oct 2023 09:04:35 +0000 (11:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 18 Oct 2023 09:04:37 +0000 (11:04 +0200)
Switch from serde_json::Value to an empty tuple, to not suggest this
actually returns a value from the API other than a possible error.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-backup-client/src/snapshot.rs

index fcfe584059983bb81c6173b242ca65196ba96dd2..f195c23b7e57cfee10099d93178ae754b4186bee 100644 (file)
@@ -177,7 +177,7 @@ async fn list_snapshot_files(param: Value) -> Result<Value, Error> {
     }
 )]
 /// Forget (remove) backup snapshots.
-async fn forget_snapshots(param: Value) -> Result<Value, Error> {
+async fn forget_snapshots(param: Value) -> Result<(), Error> {
     let repo = extract_repository_from_value(&param)?;
 
     let backup_ns = optional_ns_param(&param)?;
@@ -194,7 +194,7 @@ async fn forget_snapshots(param: Value) -> Result<Value, Error> {
 
     record_repository(&repo);
 
-    Ok(Value::Null)
+    Ok(())
 }
 
 #[api(