Re: [PATCH v7 3/6] rust: io: factor common I/O helpers into Io trait

From: John Hubbard
Date: Tue Nov 25 2025 - 14:23:00 EST


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@xxxxxxxxxx> 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