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

Function case

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

Source from the content-addressed store, hash-verified

22
23#[track_caller]
24fn case<T: Flags + std::fmt::Debug>(expected: bool, value: T, inherent: impl FnOnce(&T) -> bool) {
25 assert_eq!(expected, inherent(&value), "{:?}.is_all()", value);
26 assert_eq!(
27 expected,
28 Flags::is_all(&value),
29 "Flags::is_all({:?})",
30 value
31 );
32}

Callers 1

casesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected