Function
case
(input: T::Bits, inherent: impl FnOnce(T::Bits) -> T)
Source from the content-addressed store, hash-verified
| 20 | |
| 21 | #[track_caller] |
| 22 | fn case<T: Flags>(input: T::Bits, inherent: impl FnOnce(T::Bits) -> T) |
| 23 | where |
| 24 | <T as Flags>::Bits: std::fmt::Debug + PartialEq, |
| 25 | { |
| 26 | assert_eq!( |
| 27 | input, |
| 28 | inherent(input).bits(), |
| 29 | "T::from_bits_retain({:?})", |
| 30 | input |
| 31 | ); |
| 32 | assert_eq!( |
| 33 | input, |
| 34 | T::from_bits_retain(input).bits(), |
| 35 | "Flags::from_bits_retain({:?})", |
| 36 | input |
| 37 | ); |
| 38 | } |
Tested by
no test coverage detected