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

Implement std::io::Write for Vec<'bump, u8> #216

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

marmeladema
Copy link
Contributor

Hi @fitzgen

Here is my attempt to implement std::io::Write for Vec<'bump, u8>
I believe there are other common traits like this we could implement for some collections but I have left that for another time (but I 'd be happy to contribute those).

I have a few questions:

  1. The current std feature does not do anything on its own, it's currently only useful if you also have the collections feature enabled too. I think it's fine but I wondered if having instead a collections-std feature depending on collections would be better? Although the std feature is pretty standard across the community.
  2. Are there enough tests and are they at the right place? The implementation seems trivial and has been copied from std (except for the vectored part that is currently unstable).

Fixes #215

Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Yeah, it is fine that std without collections doesn't do anything. That's the community norm name and it gives us a place to add any non-collection related std things in the future if it is ever needed.

@fitzgen fitzgen merged commit 7dbb89c into fitzgen:main Sep 14, 2023
8 checks passed
@fitzgen
Copy link
Owner

fitzgen commented Sep 14, 2023

@marmeladema do you need a release with this?

@marmeladema
Copy link
Contributor Author

If that's not too much to ask, that would be helpful yeah.

@fitzgen
Copy link
Owner

fitzgen commented Sep 14, 2023

Just published 3.14.0!

@marmeladema marmeladema deleted the std-io-write branch September 14, 2023 19:51
@marmeladema
Copy link
Contributor Author

Thanks a lot! That's really helpful :-)

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.

Implement std::io::Write for Vec<'bump, u8>
2 participants