Re: [PATCH v3 2/4] rust: kernel: rbtree: remove unwrap in asserts

Alice Ryhl
2024-11-25T09:03:39Z

On Sat, Nov 23, 2024 at 10:50 AM Daniel Sedlak <daniel@sedlak.dev> wrote:
>
> Remove `unwrap` in asserts and replace it with `Option::Some`
> matching. By doing it this way, the examples are more
> descriptive, so it disambiguates the return type of
> the `get(...)` and `next(...)`, because the `unwrap(...)`
> can also be called on `Result`.
>
> Signed-off-by: Daniel Sedlak <daniel@sedlak.dev>