Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-12 Thread Gary Guo
On Tue, 11 Feb 2025 21:24:44 +0100 Andreas Hindborg wrote: > "Gary Guo" writes: > > > On Tue, 11 Feb 2025 16:57:36 +0100 > > Andreas Hindborg wrote: > > > >> The `Index` implementation on `BStr` was lost when we switched `BStr` from > >> a type alias of `[u8]` to a newtype. This patch adds b

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Andreas Hindborg
"Gary Guo" writes: > On Tue, 11 Feb 2025 16:57:36 +0100 > Andreas Hindborg wrote: > >> The `Index` implementation on `BStr` was lost when we switched `BStr` from >> a type alias of `[u8]` to a newtype. This patch adds back `Index` by >> implementing `Index` for `BStr` when `Index` would be imple

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Gary Guo
On Tue, 11 Feb 2025 16:57:36 +0100 Andreas Hindborg wrote: > The `Index` implementation on `BStr` was lost when we switched `BStr` from > a type alias of `[u8]` to a newtype. This patch adds back `Index` by > implementing `Index` for `BStr` when `Index` would be implemented for > `[u8]`. > > Sig

[PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Andreas Hindborg
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. This patch adds back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 11 +++ 1