[byteorder] Remove byteorder feature and crate dep#583
Conversation
5d72b31 to
88161ae
Compare
|
As it stands, this won't compile on our MSRV because it doesn't support |
88161ae to
c330a3c
Compare
a538d86 to
da07b83
Compare
| A, | ||
| Usize, | ||
| usize, | ||
| mem::size_of::<usize>() * 8, |
There was a problem hiding this comment.
The rustdoc CI failures seem to come from the fact that, in define_type!, we use stringify! on this expr in order to generate the doc comment.
I think the simplest thing to do here might just be to introduce a new macro argument that is used in the summary sentence of the doc comment instead of doing stringify!($bits). It would have the text, "A 16-bit unsigned integer" , "A word-sized signed integer", etc. i.e.:
Old
doc_comment! {
concat!("A ", stringify!($bits), "-bit ", $number_kind,
" stored in a given byte order.New
doc_comment! {
concat!($description, " stored in a given byte order.This would also allow us to get rid of the $number_kind argument.
da07b83 to
da53e7a
Compare
Remove the `byteorder` feature and the dependency on the `byteorder` crate. Replace the `ByteOrder` trait and types which implement it from the `byteorder` crate with our own native implementations. This prepares us for a future commit in which we will make some of our functions and methods `const`. This commit doesn't implement this yet because it doesn't play nicely with our current MSRV; in order to support this, we'll need to introduce machinery that allows us to compile functions as conditionally `const` depending on what Rust toolchain version is used. See #574 for a prototype of this machinery. Add `Usize` and `Isize` byte order-aware types. Closes #438
da53e7a to
e22f7d8
Compare
Remove the
byteorderfeature and the dependency on thebyteordercrate. Replace theByteOrdertrait and types which implement it from thebyteordercrate with our own native implementations. This allows us to make some of our functions and methodsconst.Add
UsizeandIsizebyte order-aware types.Closes #438