Closed cuviper closed 4 years ago
This is a draft because it lacks testing, but I'd like feedback on the idea before I spend more time on it.
That's fine, this was just a passing idea on my part. I don't have the energy to drive ecosystem changes around this.
It's not clear to me whether your hesitance is leaning yes/no, but I'll just close for now. Maybe someone else will come along and argue that they really need it, and then it can always be revived...
Yes, I think closing is the right choice. I do appreciate you exploring this though!
I don't have the energy to drive ecosystem changes around this.
Yeah, I don't really have that energy either. I hope someone does sometime!
Inspired by
Iterator::collect
andFromIterator
, this adds extension traitBumpIterator
withcollect_in
, using a newFromIteratorIn
trait for collections to implement.This unifies the existing inherent
from_iter_in
methods in each container, and also allows generic tricks like collectingResult
orOption
with short-circuiting.