[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ-ks9kR8hF1MOVLxzFPp7kesfafMVtku+GzDgyOuGg82jSLpQ@mail.gmail.com>
Date: Thu, 24 Apr 2025 09:48:39 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Danilo Krummrich <dakr@...nel.org>, Matthew Maurer <mmaurer@...gle.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/7] rust: alloc: add Vec::pop
On Thu, Apr 24, 2025 at 7:48 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
>
> On Wed, Apr 23, 2025 at 11:42:52AM -0400, Tamir Duberstein wrote:
> > On Tue, Apr 22, 2025 at 5:53 AM Alice Ryhl <aliceryhl@...gle.com> wrote:
> > >
> > > This introduces a basic method that our custom Vec is missing. I expect
> > > that it will be used in many places, but at the time of writing, Rust
> > > Binder has six calls to Vec::pop.
> > >
> > > Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
> >
> > Could this be written in terms of `remove`?
>
> The `remove` method has a lot of logic to move around elements, so I'm
> not sure we would want to do that.
Wouldn't we want `remove(len-1)` to avoid that logic anyhow?
Powered by blists - more mailing lists