MCPcopy Create free account
hub / github.com/bitflags/bitflags / cases

Function cases

src/tests/from_bits_retain.rs:6–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5#[test]
6fn cases() {
7 case(0, TestFlags::from_bits_retain);
8 case(1, TestFlags::from_bits_retain);
9 case(1 | 1 << 1 | 1 << 2, TestFlags::from_bits_retain);
10
11 case(1 << 3, TestFlags::from_bits_retain);
12 case(1 | 1 << 3, TestFlags::from_bits_retain);
13
14 case(1 | 1 << 1, TestOverlapping::from_bits_retain);
15
16 case(1 << 1, TestOverlapping::from_bits_retain);
17
18 case(1 << 5, TestExternal::from_bits_retain);
19}
20
21#[track_caller]
22fn case<T: Flags>(input: T::Bits, inherent: impl FnOnce(T::Bits) -> T)

Callers

nothing calls this directly

Calls 1

caseFunction · 0.70

Tested by

no test coverage detected