Re: [PATCH 6/9] oid-array: provide a for-loop iterator
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 4, 2020, 20:57 UTC
- Message-ID
- <CAPig+cQms-VgBCWM_CpxkwAu4aQBVmqHkr4TPu9CR08w3RiLVw@mail.gmail.com>
- In-Reply-To
- <X8qfr2B0OfaySjPh@coredump.intra.peff.net>
On Fri, Dec 4, 2020 at 3:45 PM Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> On Fri, Dec 04, 2020 at 02:18:45PM -0500, Eric Sunshine wrote: > > Minor: I see that the example code sorts the array first -- which is > > necessary, as explained in the commit message -- but I wonder if it is > > worth calling out explicitly in the prose: > > > > Find the next unique oid in the array after position `cur`. > > The array must be sorted for this to work. You can use > > this to iterate over unique elements like this: > > Thanks, that makes sense; I picked up your wording here.
It's probably not worth a re-roll just to update this comment, but if you're re-rolling anyhow, the wording could be improved slightly:
Find the next unique oid in the array after position `cur`.
The array must be sorted for this to work. You can iterate
over unique elements like this: