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

Allow reclaiming the current allocation #686

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Commits on May 17, 2024

  1. Allow reclaiming the current allocation

    This fixes tokio-rs#680, where it was noted that it is hard to use
    BytesMut without additional allocations in some circumstances.
    shahn committed May 17, 2024
    Configuration menu
    Copy the full SHA
    d745a4f View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2024

  1. Allow copying bytes in BytesMut::try_reclaim

    This has the nice side effect of making the implementation simpler with
    regards to unsafe code, as it mostly follows what `reserve` does.
    shahn committed Jun 9, 2024
    Configuration menu
    Copy the full SHA
    26c14f0 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2024

  1. Don't panic when trying to reclaim a huge number

    Implementing the suggestion by @conradludgate
    shahn committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    c5db373 View commit details
    Browse the repository at this point in the history