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

Function case

src/tests/unknown.rs:27–40  ·  view source on GitHub ↗
(expected: bool, value: T, inherent: impl FnOnce(&T) -> bool)

Source from the content-addressed store, hash-verified

25}
26#[track_caller]
27fn case<T: Flags + std::fmt::Debug>(expected: bool, value: T, inherent: impl FnOnce(&T) -> bool) {
28 assert_eq!(
29 expected,
30 inherent(&value),
31 "{:?}.contains_unknown_bits()",
32 value
33 );
34 assert_eq!(
35 expected,
36 Flags::contains_unknown_bits(&value),
37 "Flags::contains_unknown_bits({:?})",
38 value
39 );
40}

Callers 1

casesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected