[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b0715438-af4f-441a-84c0-8e4abc621df6@nvidia.com>
Date: Tue, 25 Nov 2025 11:19:25 -0800
From: John Hubbard <jhubbard@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>, Alice Ryhl <aliceryhl@...gle.com>
Cc: Zhi Wang <zhiw@...dia.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, joelagnelf@...dia.com,
zhiwang@...nel.org
Subject: Re: [PATCH v7 3/6] rust: io: factor common I/O helpers into Io trait
On 11/25/25 6:46 AM, Alexandre Courbot wrote:
> On Tue Nov 25, 2025 at 11:22 PM JST, Alice Ryhl wrote:
>> On Tue, Nov 25, 2025 at 3:15 PM Alexandre Courbot <acourbot@...dia.com> wrote:
...
>> If you have IoInfallible depend on IoFallible, then you can place
>> `addr` on IoFallible.
>
> Indeed. Maybe we could even make `IoInfallible` automatically
> implemented, since it just needs to `unwrap_unchecked` the fallible
> implementation if the range is valid.
>
>> (And I still think you should rename IoFallible to Io and IoInfallible
>> to IoKnownSize.)
>
> Agreed, there are other reasons for I/O to fail than a bad index so this
> should not be part of the name of these traits.
Great! That neatly fixes the naming problem that was bothering me about
Io*, too.
thanks,
--
John Hubbard
Powered by blists - more mailing lists