5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-07 17:18:03 +03:00

datastore: catalog: added lifetime to find function

Added lifetime to `find` function. We need this lifetime
because of the `impl MatchList` and 'anonymous lifetimes in
`impl Trait` are unstable'.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
Gabriel Goller 2023-09-18 15:41:09 +02:00 committed by Wolfgang Bumiller
parent 3a38717de9
commit e9c18590f5

View File

@ -661,11 +661,11 @@ impl<R: Read + Seek> CatalogReader<R> {
/// Finds all entries matching the given match patterns and calls the
/// provided callback on them.
pub fn find(
pub fn find<'a>(
&mut self,
parent: &DirEntry,
file_path: &mut Vec<u8>,
match_list: &impl MatchList, //&[MatchEntry],
match_list: &'a impl MatchList<'a>, //&[MatchEntry],
callback: &mut dyn FnMut(&[u8]) -> Result<(), Error>,
) -> Result<(), Error> {
let file_len = file_path.len();