Skip to content

fix(types): simplify Kind::to_hex using enum discriminant cast and add unit test - #203

Open
yappermoar-boop wants to merge 1 commit into
commonwarexyz:mainfrom
yappermoar-boop:fix-types-kind-hex-formatting-and-test-coverage
Open

fix(types): simplify Kind::to_hex using enum discriminant cast and add unit test#203
yappermoar-boop wants to merge 1 commit into
commonwarexyz:mainfrom
yappermoar-boop:fix-types-kind-hex-formatting-and-test-coverage

Conversation

@yappermoar-boop

Copy link
Copy Markdown

Simplified Kind::to_hex in types/src/lib.rs to use hex(&[*self as u8]) directly instead of manually matching hardcoded byte values. Added test_kind_conversion unit test covering valid (0, 1, 2) and out-of-range (3, 255) cases for Kind::from_u8 and Kind::to_hex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant