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

Function cases

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

Source from the content-addressed store, hash-verified

4
5#[test]
6fn cases() {
7 case(
8 TestFlags::ABC | TestFlags::from_bits_retain(1 << 3),
9 TestFlags::ABC,
10 );
11
12 case(TestZero::empty(), TestZero::empty());
13
14 case(TestZero::all(), TestZero::all());
15
16 case(
17 TestFlags::from_bits_retain(1 << 3) | TestFlags::all(),
18 TestFlags::all(),
19 );
20}
21
22#[track_caller]
23fn case<T: Flags + std::fmt::Debug>(mut before: T, after: T)

Callers

nothing calls this directly

Calls 1

caseFunction · 0.70

Tested by

no test coverage detected