rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Benno Lossin <lossin@kernel.org>
Cc: Albin Babu Varghese <albinbabuvarghese20@gmail.com>,
	rust-for-linux@vger.kernel.org
Subject: Re: [[PATCH]] rust/list: replace unwrap() with ? in doctest examples
Date: Mon, 26 May 2025 12:33:03 +0200	[thread overview]
Message-ID: <CANiq72nNX++eUKAHYvxMvEeHy6cfDP98cteVAgM7RuQH5hDkVg@mail.gmail.com> (raw)
In-Reply-To: <DA5Y0QPY52WJ.DFA7YNSN2B2M@kernel.org>

On Mon, May 26, 2025 at 10:18 AM Benno Lossin <lossin@kernel.org> wrote:
>
> The changes themselves look good, if we want to use the `ok_or` + error
> combination. I haven't thought about this, so there might be something
> better here, but it already is an improvement over the previous one.

Yeah, I thought if perhaps we could have a better method (extension
trait) for these cases, at least for unit tests. On the other hand, if
it is just for unit tests, we are back at using something that is not
"real code", which is what triggered this patch (but at least it would
not panic).

Cheers,
Miguel

  reply	other threads:[~2025-05-26 10:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 22:59 [[PATCH]] rust/list: replace unwrap() with ? in doctest examples Albin Babu Varghese
2025-05-26  8:18 ` Benno Lossin
2025-05-26 10:33   ` Miguel Ojeda [this message]
2025-05-26 20:28     ` Benno Lossin
2025-05-27  1:12       ` Albin Babu Varghese
2025-05-27  0:53   ` Albin Babu Varghese

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=CANiq72nNX++eUKAHYvxMvEeHy6cfDP98cteVAgM7RuQH5hDkVg@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=albinbabuvarghese20@gmail.com \
    --cc=lossin@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;
as well as URLs for NNTP newsgroup(s).