diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2026-03-14 10:06:13 +0900 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-03-17 20:04:11 +0100 |
| commit | 164f8634bfd8eef7b90c429156c59706635cfb88 (patch) | |
| tree | c4955d2bf9f21df8d3424a8a354e57329ae08eb4 /arch/v850/kernel/git@git.tavy.me:linux.git | |
| parent | c59a2d14cd248c77457b821b15c72e6a6a268553 (diff) | |
rust: num: add `into_bool` method to `Bounded`
Single-bit numbers are typically treated as booleans. There is an
`Into<bool>` implementation for those, but invoking it from contexts
that lack type expectations is not always convenient.
Add an `into_bool` method as a simpler shortcut.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Yury Norov <yury.norov@gmail.com>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260314-register-v9-3-86805b2f7e9d@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'arch/v850/kernel/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
