Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overrides to iterator methods for str::Bytes #28101

Merged
merged 1 commit into from
Aug 31, 2015

Conversation

isomorpheme
Copy link
Contributor

Specifically, count, last, and nth are implemented to use the
methods of the underlying slice iterator.

Partially closes #24214.

Specifically, `count`, `last`, and `nth` are implemented to use the
methods of the underlying slice iterator.

Partially closes rust-lang#24214.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@isomorpheme
Copy link
Contributor Author

r? @aturon

@rust-highfive rust-highfive assigned aturon and unassigned brson Aug 30, 2015
@@ -814,6 +814,37 @@ fn test_bytes_revator() {
}

#[test]
fn test_bytesator_nth() {
let s = "ศไทย中华Việt Nam";
let v = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need the whole bytes vector here?

@alexcrichton
Copy link
Member

@bors: r+ dacf272

@bors
Copy link
Contributor

bors commented Aug 31, 2015

⌛ Testing commit dacf272 with merge b0f77ba...

bors added a commit that referenced this pull request Aug 31, 2015
Specifically, `count`, `last`, and `nth` are implemented to use the
methods of the underlying slice iterator.

Partially closes #24214.
@bors bors merged commit dacf272 into rust-lang:master Aug 31, 2015
@isomorpheme isomorpheme deleted the 24214-str-bytes branch September 5, 2015 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Override Iterator methods when possible in std
7 participants