mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Alice Ryhl" <aliceryhl@google.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rust: vec: impl Default for Vec with any allocator
Date: Tue, 10 Jun 2025 13:04:00 +0200	[thread overview]
Message-ID: <DAISXMX28GH1.28P041TUGVRSR@kernel.org> (raw)
In-Reply-To: <20250610-vec-default-v1-1-7bb2c97d75a0@google.com>

On Tue Jun 10, 2025 at 12:31 PM CEST, Alice Ryhl wrote:
> The implementation of Default is restricted to only work with kmalloc
> vectors for no good reason. This means I have to use
>
> 	mem::replace(&mut my_vec, KVVec::new())
>
> in Rust Binder instead of `mem::take(&mut my_vec)`. Thus, expand the
> impl of Default to work with any allocator including kvmalloc.
>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Reviewed-by: Benno Lossin <lossin@kernel.org>

---
Cheers,
Benno

> ---
>  rust/kernel/alloc/kvec.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

  reply	other threads:[~2025-06-10 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 10:31 Alice Ryhl
2025-06-10 11:04 ` Benno Lossin [this message]
2025-06-11 17:31 ` Danilo Krummrich

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=DAISXMX28GH1.28P041TUGVRSR@kernel.org \
    --to=lossin@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®