[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <D8YR5JN9RZY0.3S26QBYXWDIK5@nvidia.com>
Date: Sat, 05 Apr 2025 22:51:00 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Alexandre Courbot" <acourbot@...dia.com>, "Danilo Krummrich"
<dakr@...nel.org>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex Gaynor"
<alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
<gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <benno.lossin@...ton.me>,
"Andreas Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl"
<aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>
Cc: "Joel Fernandes" <joelagnelf@...dia.com>, "John Hubbard"
<jhubbard@...dia.com>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rust: alloc: implement `extend` for `Vec`
On Sat Apr 5, 2025 at 10:26 PM JST, Alexandre Courbot wrote:
> KVec currently has `extend_with` and `extend_from_slice` methods, but no
> way extend a vector from a regular iterator as provided by the `Extend`
> trait.
>
> Due to the need to provide the GFP flags, `Extend` cannot be implemented
> directly, so simply define a homonymous method that takes an extra
> `flags` argument.
>
> The aforementioned `extend_with` and `extend_from_slice` can then be
> reimplemented as direct invocations of this new method - maybe they can
> eventually be removed.
>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
Argh, I did not notice that the code in the diff was no needlessly
intermingled. Let me change the diff algorithm and send a more readable
version.
Powered by blists - more mailing lists