From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Danilo Krummrich <dakr@redhat.com>
Cc: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com,
boqun.feng@gmail.com, gary@garyguo.net,
bjorn3_gh@protonmail.com, benno.lossin@proton.me,
a.hindborg@samsung.com, aliceryhl@google.com,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: alloc: use `if` instead of `match` in VecExt<T>::reserve()
Date: Wed, 8 May 2024 00:47:37 +0200 [thread overview]
Message-ID: <CANiq72nBTHgg5HZOCcQ4E_0oX14MZCrLNivUcV63jiEmcRDfuQ@mail.gmail.com> (raw)
In-Reply-To: <20240507201709.105693-1-dakr@redhat.com>
On Tue, May 7, 2024 at 10:17 PM Danilo Krummrich <dakr@redhat.com> wrote:
>
> In commit 1161057f53f6 ("rust: alloc: fix dangling pointer in
> VecExt<T>::reserve()") the check for zero of a vector's capacity has
> been implemented using a `match` statement. Using an `if` statement
> is the preferred style, hence change that.
>
> Link: https://lore.kernel.org/rust-for-linux/2c69a6eb-67a2-439c-ad27-70be130436d4@proton.me/T/
> Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Applied to `rust-next` as fixup for "[PATCH v3] rust: alloc: fix
dangling pointer in VecExt<T>::reserve()" -- thanks!
Cheers,
Miguel
prev parent reply other threads:[~2024-05-07 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-07 20:16 [PATCH] rust: alloc: use `if` instead of `match` in VecExt<T>::reserve() Danilo Krummrich
2024-05-07 22:47 ` Miguel Ojeda [this message]
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=CANiq72nBTHgg5HZOCcQ4E_0oX14MZCrLNivUcV63jiEmcRDfuQ@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@redhat.com \
--cc=gary@garyguo.net \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=wedsonaf@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).