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

impl std::io::Write for TinyVec<[u8; x]> #151

Open
eeeebbbbrrrr opened this issue Sep 22, 2021 · 5 comments
Open

impl std::io::Write for TinyVec<[u8; x]> #151

eeeebbbbrrrr opened this issue Sep 22, 2021 · 5 comments

Comments

@eeeebbbbrrrr
Copy link
Contributor

Would y'all accept a PR that implements std::io::Write for u8-based TinyVecs?

If so, I'd be thrilled to submit it.

@Lokathor
Copy link
Owner

Yes. I'd love it. It should be behind a feature named std but otherwise I think you can figure out the rest.

@eeeebbbbrrrr
Copy link
Contributor Author

Consider it done. Thanks!

@eeeebbbbrrrr
Copy link
Contributor Author

eeeebbbbrrrr commented Sep 23, 2021

I have a question regarding a std feature...

How do I use that to defeat the #![no_std] at the top of src/lib.rs? This is probably my lack of Rust knowledge showing...

@Lokathor
Copy link
Owner

you'd change that to #![cfg_attr(not(feature = "std"), no_std)]

@eeeebbbbrrrr
Copy link
Contributor Author

Thank you. I'd have never figured that out.

I'll put up a PR tomorrow. It was overly simple to implement. Y'all did a great job with TinyVec. Every time I find a use for it in my projects performance improves measurably. It's such a valuable crate.

Lokathor pushed a commit that referenced this issue Sep 24, 2021
* impl std::io::Write for u8-based TinyVec

* undo bad formatting

* fix formatting
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

No branches or pull requests

2 participants