Thomas B

Results 236 comments of Thomas B

This is pretty much `.chain(std::iter::once_with(|| ...).flatten())`, but more efficient (esp. since it could specialize `size_hint` and the like). https://doc.rust-lang.org/std/iter/fn.once_with.html

Please send the fix and I'll look at it and most likely incorporate it in there. 🙂 However with regards to the Send/Sync change, how do you mean to deal...

This seems like a useful functionality. - Performance-wise, it should call many of the original iterator's implementations in order to preserve the possible optimizations (and `count` should have a custom...

> I'd want to make sure that the decrement is mostly optimised out in cases where the size hint ends up not being used. In these cases probably fold/for_each could...

Wait is that the [DoubleEndedIterator](https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html) impl for [ScheduleIterator](https://docs.rs/cron/latest/cron/struct.ScheduleIterator.html) ? In which case that is not a valid implementation of [DoubleEndedIterator](https://doc.rust-lang.org/nightly/core/iter/traits/double_ended/trait.DoubleEndedIterator.html) (which contractually means you can iterate both from the front...

Actually I'm thinking using [the Range types](https://doc.rust-lang.org/stable/std/ops/index.html#structs) with ranges of datetimes would probably be the ideal interface :) ```rust // all future events schedule.events(start_datetime..) // all past events, iterates in...

Thank you, had not noticed, I can remove my own wrapper now ^^' Looks to me like BytesMut could still implement it directly, it would make the interface easier.

> Came across this today and just wanted to update for future readers that in 0.6.0, `BytesMut::writer` is available, the ext traits have been removed. Perhaps this should be closed?...

> But channel may become invalid even a reference is kept, which can just ensure it's not dropped by the wrapper. > For client call, we can get the channel...