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

Function case

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

Source from the content-addressed store, hash-verified

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

Callers 1

casesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected