iterator: add DoubleEndedIterator concept + other small commits#7707
Closed
thestinger wants to merge 4 commits intorust-lang:masterfrom
thestinger:double
Closed
iterator: add DoubleEndedIterator concept + other small commits#7707thestinger wants to merge 4 commits intorust-lang:masterfrom thestinger:double
thestinger wants to merge 4 commits intorust-lang:masterfrom
thestinger:double
Conversation
This implements the trait for vector iterators, replacing the reverse iterator types. The methods will stay, for implementing the future reverse Iterable traits and convenience. This can also be trivially implemented for circular buffers and other variants of arrays like strings and `SmallIntMap`/`SmallIntSet`. The `DoubleEndedIterator` trait will allow for implementing algorithms like in-place reverse on generic mutable iterators. The naming (`Range` vs. `Iterator`, `Bidirectional` vs. `DoubleEnded`) can be bikeshedded in the future.
just avoid giving an inline hint in the first place
Indentation now works correctly on subsequent lines of a multi-line
comment, whether there are leaders (` * `) or not. (Formerly it was
incorrectly doing a two-space indent if there was no leader.)
By default, this no longer puts a ` * ` leader on `/*!` comments, as
that appears to be the current convention in the Rust source code, but
that can easily be re-enabled if desired:
let g:rust_bang_comment_leader = 1
This was referenced Jul 11, 2013
bors
added a commit
that referenced
this pull request
Jul 11, 2013
00da76d r=cmr 6e75f2d r=cmr This implements the trait for vector iterators, replacing the reverse iterator types. The methods will stay, for implementing the future reverse Iterable traits and convenience. This can also be trivially implemented for circular buffers and other variants of arrays like strings. The `DoubleEndedIterator` trait will allow for implementing algorithms like in-place reverse on generic mutable iterators. The naming (`Range` vs. `Iterator`, `Bidirectional` vs. `DoubleEnded`) can be bikeshedded in the future.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Sep 28, 2021
…ishearth Don't lint `suspicious_else_formatting` inside proc-macros fixes: rust-lang#7650 I'll add a test for this one soon. changelog: Don't lint `suspicious_else_formatting` inside proc-macros
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.
00da76d r=cmr
6e75f2d r=cmr
This implements the trait for vector iterators, replacing the reverse
iterator types. The methods will stay, for implementing the future
reverse Iterable traits and convenience.
This can also be trivially implemented for circular buffers and other
variants of arrays like strings.
The
DoubleEndedIteratortrait will allow for implementing algorithmslike in-place reverse on generic mutable iterators.
The naming (
Rangevs.Iterator,Bidirectionalvs.DoubleEnded)can be bikeshedded in the future.