summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/layout.rs
diff options
context:
space:
mode:
authorDaniel Sedlak <daniel@sedlak.dev>2024-11-23 12:50:31 +0300
committerMiguel Ojeda <ojeda@kernel.org>2025-01-14 01:45:05 +0300
commitb6357e26865a25650e49c4eb5abe6ef57ae4ede1 (patch)
tree67e858041de3d2848cb6eb9cc812f5994ac08d3e /rust/kernel/alloc/layout.rs
parent57c1ccc7e71a2f08ef0c1c525408195fb606bc36 (diff)
downloadlinux-b6357e26865a25650e49c4eb5abe6ef57ae4ede1.tar.xz
rust: str: replace unwraps with question mark operators
Simplify the error handling by replacing unwraps with the question mark operator. Furthermore, unwraps can convey a wrong impression that unwrapping is fine in general, thus this patch removes this unwrapping. Suggested-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/rust-for-linux/CANiq72nsK1D4NuQ1U7NqMWoYjXkqQSj4QuUEL98OmFbq022Z9A@mail.gmail.com/ Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Daniel Sedlak <daniel@sedlak.dev> Link: https://lore.kernel.org/r/20241123095033.41240-5-daniel@sedlak.dev [ Slightly reworded commit. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/layout.rs')
0 files changed, 0 insertions, 0 deletions