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

Function case

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

Source from the content-addressed store, hash-verified

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

Callers 1

casesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected