Add Iterator::intersperse_with#80567
Merged
bors merged 4 commits intorust-lang:masterfrom Jan 14, 2021
Merged
Conversation
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
0fd4758 to
7ed824e
Compare
Contributor
Author
|
Removes the |
Contributor
Author
|
@m-ou-se poke :-) |
m-ou-se
reviewed
Jan 13, 2021
Member
m-ou-se
left a comment
There was a problem hiding this comment.
This looks great!
I have a small nit and a question:
6 tasks
Contributor
Author
|
All addressed |
m-ou-se
reviewed
Jan 13, 2021
Member
m-ou-se
left a comment
There was a problem hiding this comment.
Thanks! This is ready to merge then, with two typos fixed:
Contributor
Author
|
All fixed, addressed the example a bit. gtg imo |
Member
|
Thanks for working on this! @bors r+ |
Collaborator
|
📌 Commit 9b2f085 has been approved by |
Contributor
Author
@m-ou-se Thanks for your review! |
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this pull request
Jan 14, 2021
Add Iterator::intersperse_with This is a follow-up to rust-lang#79479, tracking in rust-lang#79524, as discussed rust-lang#79479 (comment). ~~Note that I had to manually implement `Clone` and `Debug` because `derive` insists on placing a `Clone`-bound on the struct-definition, which is too narrow. There is a long-standing issue # for this somewhere around here :-)~~ Also, note that I refactored the guts of `Intersperse` into private functions and re-used them in `IntersperseWith`, so I also went light on duplicating all the tests. If this is suitable to be merged, the tracking issue should be updated, since it only mentions `intersperse`. Happy New Year! r? `@m-ou-se`
This was referenced Jan 14, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 14, 2021
Rollup of 17 pull requests Successful merges: - rust-lang#79982 (Add missing methods to unix ExitStatusExt) - rust-lang#80017 (Suggest `_` and `..` if a pattern has too few fields) - rust-lang#80169 (Recommend panic::resume_unwind instead of panicking.) - rust-lang#80217 (Add a `std::io::read_to_string` function) - rust-lang#80444 (Add as_ref and as_mut methods for Bound) - rust-lang#80567 (Add Iterator::intersperse_with) - rust-lang#80829 (Get rid of `DepConstructor`) - rust-lang#80895 (Fix handling of malicious Readers in read_to_end) - rust-lang#80966 (Deprecate atomic::spin_loop_hint in favour of hint::spin_loop) - rust-lang#80969 (Use better ICE message when no MIR is available) - rust-lang#80972 (Remove unstable deprecated Vec::remove_item) - rust-lang#80973 (Update books) - rust-lang#80980 (Fixed incorrect doc comment) - rust-lang#80981 (Fix -Cpasses=list and llvm version print with -vV) - rust-lang#80985 (Fix stabilisation version of slice_strip) - rust-lang#80990 (llvm: Remove the unused context from CreateDebugLocation) - rust-lang#80991 (Fix formatting specifiers doc links) Failed merges: - rust-lang#80944 (Use Option::map_or instead of `.map(..).unwrap_or(..)`) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to #79479, tracking in #79524, as discussed #79479 (comment).
Note that I had to manually implementCloneandDebugbecausederiveinsists on placing aClone-bound on the struct-definition, which is too narrow. There is a long-standing issue # for this somewhere around here :-)Also, note that I refactored the guts of
Intersperseinto private functions and re-used them inIntersperseWith, so I also went light on duplicating all the tests.If this is suitable to be merged, the tracking issue should be updated, since it only mentions
intersperse.Happy New Year!
r? @m-ou-se