jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
396 stars 56 forks source link

Remove byteorder dependency #124

Closed daboross closed 4 years ago

daboross commented 4 years ago

I included a fix for the last remaining header not implementing FromBytes/ToBytes in this PR, as that made removing byteorder easily. This could also be submitted separately, if you want.

I think the majority of places byteorder was used were more than well covered by the new from/to_le/be_bytes methods on integers. A few places where we're actually using it to read/write to byte slices needed more changes, mainly using copy_from_slice or try_into to convert &[u8] to [u8; N].

Let me know how this looks?

Fixes #24. CC #122.

daboross commented 4 years ago

Sounds good! Rebased.