rust-lang / wg-allocators

Home of the Allocators working group: Paving a path for a standard set of allocator traits to be used in collections!
http://bit.ly/hello-wg-allocators
203 stars 9 forks source link

Generalize the Write impl for `Vec<u8>` to `Vec<u8, A>` #86

Closed athre0z closed 3 years ago

athre0z commented 3 years ago

I'd like to generalize the Write impl for Vec<u8> to Vec<u8, A>. Is there any reason for not doing this? I suspect that this impl might simply have been forgotten because it lives in the io module rather than by the other trait impls for Vec?

TimDiekmann commented 3 years ago

Please go ahead, I think I simply forgot to implement it. 🙂

athre0z commented 3 years ago

Excellent — I created a PR over at https://github.com/rust-lang/rust/pull/82862!

athre0z commented 3 years ago

Aaaand it's merged! I'd like to use this chance to thank you (and everyone else involved with this!) for your work on allocator_api. I think that this gets a lot less attention than it deserves. Particularly for gracefully working with arena allocators, this is super important to have!

ChayimFriedman2 commented 3 years ago

I think we need to check if we have other forgotten impls. A simple way will be to just remove the default type for A and search for compiler errors.