summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc.rs
diff options
context:
space:
mode:
authorDaniel Sedlak <daniel@sedlak.dev>2024-11-23 12:50:29 +0300
committerMiguel Ojeda <ojeda@kernel.org>2025-01-14 01:44:29 +0300
commit3a518544829630d172b067be8697e018e258c445 (patch)
tree3b1c1ddc4660e29c2b3a437e97eb8e4ca6d43502 /rust/kernel/alloc.rs
parent7eeb0e7a50b8f13094f164c126ca9c0d75241d35 (diff)
downloadlinux-3a518544829630d172b067be8697e018e258c445.tar.xz
rust: rbtree: remove unwrap in asserts
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> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20241123095033.41240-3-daniel@sedlak.dev [ Reworded title slightly. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
0 files changed, 0 insertions, 0 deletions