[pbs-devel] [PATCH proxmox-backup 1/6] backup: hierarchy: add new can_access_any_namespace_in_range helper
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Oct 3 12:21:42 CEST 2025
Am 03.10.25 um 12:10 schrieb Dominik Csapak:
>>> + let mut iter = if let Ok(iter) = store.recursive_iter_backup_ns_ok(ns, max_depth) {
>>> + iter
>>> + } else {
>>> + return false;
>>> + };
>>
>> This could use let-else, e.g. something like (untested):
>>
>> let Ok(mut iter) = store.recursive_iter_backup_ns_ok(ns, max_depth) else {
>> return false;
>> };
>>
>
> can do, i wanted to stay as close as the original code as possible so
> it's easier to see that the code only moved
>
> should i do that cleanup as an extra commit or should i include it in this one?
Both are fine, personally I think it would be OK to change in one go as it's
not a complex tranformation and `git show --color-words=.` (or any advanced
pager) will show that the expression returning the iter stayed the same.
More information about the pbs-devel
mailing list