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

Function case

src/tests/fmt.rs:82–97  ·  view source on GitHub ↗
(
    value: T,
    debug: &str,
    uhex: &str,
    lhex: &str,
    oct: &str,
    bin: &str,
)

Source from the content-addressed store, hash-verified

80
81#[track_caller]
82fn case<
83 T: std::fmt::Debug + std::fmt::UpperHex + std::fmt::LowerHex + std::fmt::Octal + std::fmt::Binary,
84>(
85 value: T,
86 debug: &str,
87 uhex: &str,
88 lhex: &str,
89 oct: &str,
90 bin: &str,
91) {
92 assert_eq!(debug, format!("{:?}", value));
93 assert_eq!(uhex, format!("{:X}", value));
94 assert_eq!(lhex, format!("{:x}", value));
95 assert_eq!(oct, format!("{:o}", value));
96 assert_eq!(bin, format!("{:b}", value));
97}

Callers 1

casesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected