mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-03 08:33:17 +00:00
api-types: make BackupType::iter an actual iterator
Otherwise we have to use BackupType::iter().iter() whenever we're not using a `for _ in iter()` construct. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
214317df93
commit
1647fc93ff
@ -741,8 +741,11 @@ impl BackupType {
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn iter() -> &'static [BackupType] {
|
||||
&[Self::Vm, Self::Ct, Self::Host]
|
||||
#[inline]
|
||||
pub fn iter() -> impl Iterator<Item = BackupType> + Send + Sync + Unpin + 'static {
|
||||
[BackupType::Vm, BackupType::Ct, BackupType::Host]
|
||||
.iter()
|
||||
.copied()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user