TrolledWoods
TrolledWoods
@jswrenn I don't think it should be called drain, because it consumes the whole iterator, not just a part of a vector, like drain does. But yeah, the formatting changes...
That's a great idea @scottmcm
Yeah, this is definitely better, now we can have ``range(..)`` be the same as a noop, so we keep ALL the functionality of the underlying iterator!
I was thinking maybe the range standalone function should use IntoIterator instead of Iterator, since it seems like most other standalone functions do that in itertools
And do we really want the access to the range function to be via ``itertools::range::range``? I wanted to avoid the name clash that ``pub use range::range;`` could cause, but maybe...
I'm going to be honest though, it feels like the associated type version has a few more drawbacks than the previous approach. It adds a new trait, it changes its...
Then, making it a trait seems to be very nicely consistant with the standard library! I have really terrible internet at the moment, so it's kindof hard for me to...
One thing though, since range is so closely mapped by slice.get(), maybe it should just be called get, and support usize indexing as well? So .range(4) (or .get(4)), is just...
Welp, I don't know about the naming, but I think it's starting to come together quite nicely now
Oh sorry, I prefer tabs for my personal projects, so my editor uses them. I'll rename the things and fix the tabs