When reviewing, make sure to enable "hide whitespace" in the diff.
ran just fmt
cleaned up the last remaining UTF8 strings as b"..."
minor improvements to the doc examples
made default timeouts to use Duration (they support const)
Simplify exported namespaces - there is no point in having a multi-level exports when the entire API is just a few structs. Exported everything as root-level.
Remove BinaryMessage -- it adds to mental load to look up that this type is an alias to Vec<u8>, which is a very common type to use in these scenarios. Better to be explicit that this is just a byte buffer, rather than hide it behind what appears to be a complex structure.
This made it possible for Clippy to note that in a few places it is possible to use &[u8] instead of &Vec<u8>
When reviewing, make sure to enable "hide whitespace" in the diff.
just fmt
b"..."
Duration
(they supportconst
)BinaryMessage
-- it adds to mental load to look up that this type is an alias toVec<u8>
, which is a very common type to use in these scenarios. Better to be explicit that this is just a byte buffer, rather than hide it behind what appears to be a complex structure.&[u8]
instead of&Vec<u8>