all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH backup v3 2/2] api: use if-let pattern for error-only handling
Date: Tue, 13 Feb 2024 16:49:53 +0100	[thread overview]
Message-ID: <s8osf1wwdyb.fsf@proxmox.com> (raw)
In-Reply-To: <1707832707.8atxyms769.astroid@yuna.none>


Fabian Grünbichler <f.gruenbichler@proxmox.com> writes:

>>      async fn getxattr(&self, inode: u64, xattr: &OsStr) -> Result<pxar::format::XAttr, Error> {
>>          // TODO: pxar::Accessor could probably get a more optimized method to fetch a specific
>>          // xattr for an entry...
>>          let xattrs = self.listxattrs(inode).await?;
>> -        for entry in xattrs {
>> -            if entry.name().to_bytes() == xattr.as_bytes() {
>> -                return Ok(entry);
>> -            }
>> +        if xattrs
>> +            .iter()
>> +            .any(|entry| request.add_c_string(entry.name()).is_full())
>> +        {
>> +            return Ok(entry);
>
> but this here is an obvious copy paste error that doesn't even compile!
> please check patches before sending, even if they are supposedly trivial
> style fixes!

My bad, I thought `cargo build` on the root was enough to test this
change. Will sent a vN tomorrow splitting the commits, and fixing this.

--
Maximiliano




  reply	other threads:[~2024-02-13 16:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13 12:43 [pbs-devel] [PATCH backup v3 1/2] backup-proxy: avoid block in if condition Maximiliano Sandoval
2024-02-13 12:43 ` [pbs-devel] [PATCH backup v3 2/2] api: use if-let pattern for error-only handling Maximiliano Sandoval
2024-02-13 14:04   ` Fabian Grünbichler
2024-02-13 15:49     ` Maximiliano Sandoval [this message]
2024-02-13 13:58 ` [pbs-devel] applied: [PATCH backup v3 1/2] backup-proxy: avoid block in if condition Fabian Grünbichler

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=s8osf1wwdyb.fsf@proxmox.com \
    --to=m.sandoval@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal