api: cargo fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-15 16:01:57 +02:00
parent ca3f8757ba
commit b0166d4e8d
1 changed files with 5 additions and 3 deletions

View File

@ -599,8 +599,9 @@ pub fn list_snapshots(
fn get_snapshots_count(store: &Arc<DataStore>, owner: Option<&Authid>) -> Result<Counts, Error> { fn get_snapshots_count(store: &Arc<DataStore>, owner: Option<&Authid>) -> Result<Counts, Error> {
let root_ns = Default::default(); let root_ns = Default::default();
ListAccessibleBackupGroups::new(store, root_ns, MAX_NAMESPACE_DEPTH, owner)? ListAccessibleBackupGroups::new(store, root_ns, MAX_NAMESPACE_DEPTH, owner)?.try_fold(
.try_fold(Counts::default(), |mut counts, group| { Counts::default(),
|mut counts, group| {
let group = match group { let group = match group {
Ok(group) => group, Ok(group) => group,
Err(_) => return Ok(counts), // TODO: add this as error counts? Err(_) => return Ok(counts), // TODO: add this as error counts?
@ -620,7 +621,8 @@ fn get_snapshots_count(store: &Arc<DataStore>, owner: Option<&Authid>) -> Result
} }
Ok(counts) Ok(counts)
}) },
)
} }
#[api( #[api(