Closed
Description
Hi, since const panics are now a thing, we can assert that the node id passed to Guid::from_values has the high 16 bits cleared and take a u64 instead of a [u8; 6]. I've also cleaned up the Display implementation for Guid, replacing the manual bitshifts with the u16::from_be_bytes and u64::from_be_bytes stdlib functions. The functionality is identical (it actually ends up compiling down to the same thing, according to godbolt), but the code ends up being simpler and easier to read.
The included test suite passes with either or both changes.
Metadata
Metadata
Assignees
Labels
No labels