[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251117191427.2923aebb.zhiw@nvidia.com>
Date: Mon, 17 Nov 2025 19:14:27 +0200
From: Zhi Wang <zhiw@...dia.com>
To: Tamir Duberstein <tamird@...il.com>
CC: Alice Ryhl <aliceryhl@...gle.com>, <rust-for-linux@...r.kernel.org>,
<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<dakr@...nel.org>, <bhelgaas@...gle.com>, <kwilczynski@...nel.org>,
<ojeda@...nel.org>, <alex.gaynor@...il.com>, <boqun.feng@...il.com>,
<gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <lossin@...nel.org>,
<a.hindborg@...nel.org>, <tmgross@...ch.edu>, <markus.probst@...teo.de>,
<helgaas@...nel.org>, <cjia@...dia.com>, <smitra@...dia.com>,
<ankita@...dia.com>, <aniketa@...dia.com>, <kwankhede@...dia.com>,
<targupta@...dia.com>, <acourbot@...dia.com>, <joelagnelf@...dia.com>,
<jhubbard@...dia.com>, <zhiwang@...nel.org>
Subject: Re: [PATCH v6 RESEND 4/7] rust: io: factor common I/O helpers into
Io trait
On Fri, 14 Nov 2025 13:53:01 -0500
Tamir Duberstein <tamird@...il.com> wrote:
> On Fri, Nov 14, 2025 at 12:37 PM Zhi Wang <zhiw@...dia.com> wrote:
> >
snip
>
> What about using an associated Err type? In the infallible case, it
> would be `core::convert::Infallible`. It would be slightly more
> ergonomic if associated type defaults were stable[0], though.
>
> [0] https://github.com/rust-lang/rust/issues/29661
Thanks, Tamir. From Alice's and Danilo’s discussion, it seems we’ll keep
the fallible and infallible traits separate for now.
Still, I really like the idea of an associated Err type. Thanks for the
trick. :)
Z.
Powered by blists - more mailing lists