Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Bytes to use an internal vtable #298

Merged
merged 1 commit into from Oct 16, 2019
Merged

Commits on Oct 16, 2019

  1. Refactor Bytes to use an internal vtable

    Bytes is a useful tool for managing multiple slices into the same region
    of memory, and the other things it used to have been removed to reduce
    complexity. The exact strategy for managing the multiple references is
    no longer hard-coded, but instead backing by a customizable vtable.
    
    - Removed ability to mutate the underlying memory from the `Bytes` type.
    - Removed the "inline" (SBO) mechanism in `Bytes`. The reduces a large
      amount of complexity, and improves performance when accessing the
      slice of bytes, since a branch is no longer needed to check if the
      data is inline.
    - Removed `Bytes` knowledge of `BytesMut` (`BytesMut` may grow that
      knowledge back at a future point.)
    seanmonstar committed Oct 16, 2019
    Copy the full SHA
    224c9ab View commit details
    Browse the repository at this point in the history