Skip to content

Commit

Permalink
Make Buf and BufMut usable as trait objects (#186)
Browse files Browse the repository at this point in the history
- All the `get_*` and `put_*` methods that take `T: ByteOrder` have
  a `where Self: Sized` bound added, so that they are only usable from
  sized types. It was impossible to make `Buf` or `BufMut` into trait
  objects before, so this change doesn't break anyone.
- Add `get_n_be`/`get_n_le`/`put_n_be`/`put_n_le` methods that can be
  used on trait objects.
- Deprecate the export of `ByteOrder` and methods generic on it.

Fixes #163
  • Loading branch information
seanmonstar authored and carllerche committed Mar 12, 2018
1 parent 86c8395 commit ce79f0a
Show file tree
Hide file tree
Showing 5 changed files with 749 additions and 106 deletions.

0 comments on commit ce79f0a

Please sign in to comment.