dhcp and dhcp-server both carry a vendor_class.rs with ~14 single-predicate tests (it_is_pxe_capable, is_it_arm, is_it_x64, ... -- each does .parse().unwrap() then asserts one bool). The two files are near-identical, so the duplication spans crates.
Collapse each into one check_cases table over a named row ({ input, arm, x64, netboot, modern }), so a vendor-class string's full classification is one row. Add the MachineArchitecture::from_str numeric-code mapping ("00007" -> Arm64, "00016" -> EfiX64, unknown, ...) which is currently only exercised implicitly through VendorClass::from_str, and its Display strings.
Scope
crates/dhcp/src/vendor_class.rs and crates/dhcp-server/src/vendor_class.rs -- collapse the predicate tests; add the arch-code from_str / Display table.
Acceptance
- Both crates' classification coverage preserved + the arch-code contract pinned; no production change.
cargo test green for both; cargo clippy --all-features + cargo make format-nightly clean.
Size: M
Part of #2692.
dhcpanddhcp-serverboth carry avendor_class.rswith ~14 single-predicate tests (it_is_pxe_capable,is_it_arm,is_it_x64, ... -- each does.parse().unwrap()then asserts one bool). The two files are near-identical, so the duplication spans crates.Collapse each into one
check_casestable over a named row ({ input, arm, x64, netboot, modern }), so a vendor-class string's full classification is one row. Add theMachineArchitecture::from_strnumeric-code mapping ("00007" -> Arm64,"00016" -> EfiX64, unknown, ...) which is currently only exercised implicitly throughVendorClass::from_str, and itsDisplaystrings.Scope
crates/dhcp/src/vendor_class.rsandcrates/dhcp-server/src/vendor_class.rs-- collapse the predicate tests; add the arch-codefrom_str/Displaytable.Acceptance
cargo testgreen for both;cargo clippy --all-features+cargo make format-nightlyclean.Size: M
Part of #2692.