Closed Phantomical closed 1 year ago
@Darksonn what is needed to get this merged? The loom test failure is unrelated (and seems to be due to that workflow using an out-of-date toolchain).
Once I get around to fixing the loom test, I'll merge this. If you want, you're also welcome to submit a PR that fixes the loom test.
I've gone and submitted #577. This PR should be good to go whenever you have time :)
Thanks!
This PR introduces native-endian variants of all the
get_x
functions inBuf
andput_y
functions inBufMut
. It is pretty much a straightforward copy-paste-and-tweak for each method. There are a lot of methods though, so this PR ended up being rather big.My use case for these is that I am trying to use bytes to parse records as generated by
perf_event_open
. The fields in these use the native endianness of the host so using any of the existing methods onBuf
would be wrong.I've gone over this PR several times and I think that I have caught all the copy-paste errors but there may still be some that I missed.
Fixes #549.