Sign in
android
/
platform
/
prebuilts
/
rust
/
97b8b051982b3a0e924c462ec66b2d4d45392676
/
.
/
linux-x86
/
1.55.0
/
src
/
stdlibs
/
library
/
stdarch
/
crates
/
std_detect
/
src
/
detect
/
bit.rs
blob: 6f06c5523e4fd02d1570743a7e0573e1f131e4b5 [
file
] [
log
] [
blame
]
//! Bit manipulation utilities.
/// Tests the `bit` of `x`.
#[
allow
(
dead_code
)]
#[
inline
]
pub
(
crate
)
fn
test
(
x
:
usize
,
bit
:
u32
)
->
bool
{
debug_assert
!(
bit
<
usize
::
BITS
,
"bit index out-of-bounds"
);
x
&
(
1
<<
bit
)
!=
0
}