Skip to content

Conversation

lperlaki
Copy link

This would increase the MSRV to 1.51 since it uses const generics!

I am not sure on the MSRV policy of bytes, so if this is a problem we can just close this PR

Added Methods

  • Buf::try_get_array
    is a copy of the old implementation of buf_try_get_impl
  • Buf::get_array simply calls try_get_array and panic_advance on error

the second commit changes the implementation of the get_x methods to use try_get_array

this would also enable Buf implementors to optimise (like #622) the get_x methods by overriding try_get_array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant