-
Notifications
You must be signed in to change notification settings - Fork 339
Closed
Description
A while ago there was a proposal by Jon Gjengset (jonhoo) to add take_until into Rust's standard library:
rust-lang/rust#62208
While it may be not a good fit for the standard library, it might be a worthwhile addition to itertools.
As michaelsproul pointed out in the discussion,
I don't think take_while_ref or peeking_take_while are well suited to this because they require you to assign the iterator to a local variable, and muck around with mutation, which breaks the flow of the iterator chain. The best I could do with them was this, which isn't as nice as take_until.
If you don't mind, I'd be happy to try and get your code into itertools, giving you credit of course! (Co-authored-by on the commit)
poszu, bxt, fistons, arctic-penguin and phip1611
Metadata
Metadata
Assignees
Labels
No labels