tree wide: clippy lint fixes
most (not all) where done automatically Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -163,7 +163,7 @@ async fn catalog_shell(param: Value) -> Result<(), Error> {
|
||||
let path = required_string_param(¶m, "snapshot")?;
|
||||
let archive_name = required_string_param(¶m, "archive-name")?;
|
||||
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &backup_ns, &path).await?;
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &backup_ns, path).await?;
|
||||
|
||||
let crypto = crypto_parameters(¶m)?;
|
||||
|
||||
|
@ -176,7 +176,7 @@ pub async fn dir_or_last_from_group(
|
||||
match path.parse::<BackupPart>()? {
|
||||
BackupPart::Dir(dir) => Ok(dir),
|
||||
BackupPart::Group(group) => {
|
||||
api_datastore_latest_snapshot(&client, repo.store(), ns, group).await
|
||||
api_datastore_latest_snapshot(client, repo.store(), ns, group).await
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1245,7 +1245,7 @@ async fn restore(param: Value) -> Result<Value, Error> {
|
||||
let ns = optional_ns_param(¶m)?;
|
||||
let path = json::required_string_param(¶m, "snapshot")?;
|
||||
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &ns, &path).await?;
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &ns, path).await?;
|
||||
|
||||
let target = json::required_string_param(¶m, "target")?;
|
||||
let target = if target == "-" { None } else { Some(target) };
|
||||
|
@ -205,7 +205,7 @@ async fn mount_do(param: Value, pipe: Option<Fd>) -> Result<Value, Error> {
|
||||
|
||||
let backup_ns = optional_ns_param(¶m)?;
|
||||
let path = required_string_param(¶m, "snapshot")?;
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &backup_ns, &path).await?;
|
||||
let backup_dir = dir_or_last_from_group(&client, &repo, &backup_ns, path).await?;
|
||||
|
||||
let keyfile = param["keyfile"].as_str().map(PathBuf::from);
|
||||
let crypt_config = match keyfile {
|
||||
|
Reference in New Issue
Block a user