worm-blossom / ufotofu

Abstractions for lazily consuming and producing sequences in Rust.
Apache License 2.0
3 stars 1 forks source link

Add IntoVec with Consumer implementation #4

Closed mycognosist closed 4 months ago

mycognosist commented 4 months ago
AljoschaMeyer commented 4 months ago

Looks good to me so far. Needs fuzz tests and then it can probably be merged directly?

If you think it would be very little effort (say, less than 30 min), could also do a fallible version that reports out-of-memory errors rather than crashing. That should be easy *if there are fallible versions of Vec::push and Vec::reserve. If these don't exist, then no need to bother, sicne we dont really need a fallible version anyways.

AljoschaMeyer commented 4 months ago

Nice, I like the fallible version.

mycognosist commented 4 months ago

@AljoschaMeyer

Happy for me to merge?