cargo fmt

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-05-13 16:59:32 +02:00
parent 22cfad134f
commit 8122eaadaa
2 changed files with 4 additions and 3 deletions

View File

@ -598,7 +598,8 @@ 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> {
ListAccessibleBackupGroups::new(Arc::clone(store), Default::default(), MAX_NAMESPACE_DEPTH, owner)? let root_ns = Default::default();
ListAccessibleBackupGroups::new(Arc::clone(store), root_ns, MAX_NAMESPACE_DEPTH, owner)?
.try_fold(Counts::default(), |mut counts, group| { .try_fold(Counts::default(), |mut counts, group| {
let group = match group { let group = match group {
Ok(group) => group, Ok(group) => group,

View File

@ -21,7 +21,7 @@ pub struct ListAccessibleBackupGroups<'a> {
ns_iter: ListNamespacesRecursive, ns_iter: ListNamespacesRecursive,
} }
impl <'a> ListAccessibleBackupGroups<'a> { impl<'a> ListAccessibleBackupGroups<'a> {
// TODO: builder pattern // TODO: builder pattern
pub fn new( pub fn new(
@ -41,7 +41,7 @@ impl <'a> ListAccessibleBackupGroups<'a> {
} }
} }
impl <'a> Iterator for ListAccessibleBackupGroups<'a> { impl<'a> Iterator for ListAccessibleBackupGroups<'a> {
type Item = Result<BackupGroup, Error>; type Item = Result<BackupGroup, Error>;
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {