public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH proxmox-backup 2/2] datastore: catalog: added lifetime to find function
Date: Wed, 11 Oct 2023 13:07:15 +0200	[thread overview]
Message-ID: <34fdf6c1-23dd-4067-a5cb-de4398a2d937@proxmox.com> (raw)
In-Reply-To: <20230918134109.179258-3-g.goller@proxmox.com>

bump.

On 9/18/23 15:41, Gabriel Goller wrote:
> 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>
> ---
>   pbs-datastore/src/catalog.rs | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pbs-datastore/src/catalog.rs b/pbs-datastore/src/catalog.rs
> index 86e20c92..eb531837 100644
> --- a/pbs-datastore/src/catalog.rs
> +++ b/pbs-datastore/src/catalog.rs
> @@ -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();




  reply	other threads:[~2023-10-11 11:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 13:41 [pbs-devel] [PATCH pathpatterns 0/2] remove unsafe std::mem::transmute Gabriel Goller
2023-09-18 13:41 ` [pbs-devel] [PATCH pathpatterns 1/2] match_list: " Gabriel Goller
2023-09-18 13:41 ` [pbs-devel] [PATCH proxmox-backup 2/2] datastore: catalog: added lifetime to find function Gabriel Goller
2023-10-11 11:07   ` Gabriel Goller [this message]
2023-10-19  9:16 ` [pbs-devel] applied: [PATCH pathpatterns 0/2] remove unsafe std::mem::transmute Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34fdf6c1-23dd-4067-a5cb-de4398a2d937@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal