blob: 1f02982a8fa24251889030085884084b9ecc0acc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use bitflags::bitflags;
bitflags! {
struct Flags: u32 {
const A = 0b00000001;
}
}
impl From<u32> for Flags {
fn from(v: u32) -> Flags {
Flags::from_bits_truncate(v)
}
}
fn main() {
}
|