public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	 Dominik Csapak <d.csapak@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox 1/2] api-macro: fix broken binary ident search
Date: Thu, 17 Sep 2020 08:34:54 +0200 (CEST)	[thread overview]
Message-ID: <1523553504.232.1600324495054@webmail.proxmox.com> (raw)
In-Reply-To: <1806048159.230.1600316746152@webmail.proxmox.com>


> On 09/17/2020 6:25 AM Dietmar Maurer <dietmar@proxmox.com> wrote:
> 
>  
> > @@ -394,6 +397,9 @@ impl SchemaObject {
> >  
> >      fn sort_properties(&mut self) {
> >          self.properties_.sort_by(|a, b| (a.0).cmp(&b.0));
> > +        for (idx, prop) in self.properties_.iter().enumerate() {
> > +            self.ident_hash.insert(prop.0.as_ident_str().to_string(), idx);
> > +        }
> >      }
> >  
> 
> Above looks really wrong to me. Why should we repopulate the whole hash in sort_properties()?

Ok, finally got it. We only call sort once there, so this is actually ok.




  reply	other threads:[~2020-09-17  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 12:09 Dominik Csapak
2020-09-16 12:09 ` [pbs-devel] [PATCH proxmox 2/2] api-macro: relax Fieldname rules Dominik Csapak
2020-09-17  4:25 ` [pbs-devel] [PATCH proxmox 1/2] api-macro: fix broken binary ident search Dietmar Maurer
2020-09-17  6:34   ` Dietmar Maurer [this message]
2020-09-17  6:37 ` [pbs-devel] applied: " Dietmar Maurer

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=1523553504.232.1600324495054@webmail.proxmox.com \
    --to=dietmar@proxmox.com \
    --cc=d.csapak@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